Back

API09: Improper Inventory Management - Overview

What is Improper Inventory Management?

Improper Inventory Management is the API security risk that arises when an organization loses track of where its APIs are, what versions are running, and what data each one exposes. It is less about a single flawed line of code and more about an organizational blind spot: hosts, endpoints, and versions that exist, answer requests, and touch real data, but that nobody is actively cataloguing, patching, or monitoring.

The OWASP API Security Top 10 (2023) elevated this category precisely because modern API estates grow faster than the teams that own them. Microservices multiply, versions accumulate (/v1, /v2, /v3), non-production copies are stood up and forgotten, and third-party integrations quietly move sensitive data across trust boundaries. Every one of those artifacts is an asset an attacker can find — and defenders can only protect what they know exists.

The Vocabulary of Sprawl

Practitioners describe the problem with a small but important vocabulary:

Core Concept

Proper Inventory:
  [OK] Every API host and version is catalogued
  [OK] Retired versions are actually decommissioned (not just "hidden")
  [OK] Debug / admin / test endpoints are absent from production
  [OK] All versions share the same authN/authZ and rate-limit controls
  [OK] Data flows to third parties are documented and reviewed

Improper Inventory:
  [X] /api/v1 still live with no auth, years after /api/v3 shipped
  [X] dev-api.example.com internet-facing with production data
  [X] /debug, /actuator, /swagger, /metrics reachable in prod
  [X] A mobile-only endpoint bypasses the web API's rate limiting
  [X] Nobody can produce a definitive list of the org's APIs

Why It's Different from the Other Top 10 Risks

Most API risks (BOLA, broken authentication, SSRF) describe a flaw inside a known endpoint. Improper Inventory Management is a meta-risk: it is the reason those other flaws stay exploitable long after they are "fixed." You can patch broken authentication in /v3, but if /v1 is still online with the original bug, the fix never reached the attacker's actual entry point. Inventory management is the discipline that ensures a fix applied in one place reaches every place the vulnerable behavior lives.

Why Does This Matter?

The Business Impact

The Technical Impact

Technical Context

How Sprawl Actually Happens

Improper inventory is rarely the result of negligence by a single engineer. It is an emergent property of how software organizations operate:

1. Versioning without a deprecation policy

Teams add /v2 when a breaking change is needed, but keeping /v1 alive "for a few old clients" is easier than migrating them. Without a documented sunset date and a monitoring plan, "temporary" becomes permanent.

GET /api/v1/users/123    -> 200 OK  (legacy, no auth check on some fields)
GET /api/v2/users/123    -> 401     (requires bearer token)
GET /api/v3/users/123    -> 401     (requires token + scope check)

An attacker enumerates versions and settles on v1.

2. Non-production environments exposed to the internet

Staging, QA, UAT, and demo systems are frequently deployed with production-like data but weaker controls, default credentials, or verbose errors. When they are reachable from the internet and resolve in public DNS, they become a soft entry point.

api.example.com          -> production, hardened
dev-api.example.com      -> staging, seeded with a copy of prod data
staging.example.com      -> debug mode on, stack traces enabled
uat-payments.example.com -> old TLS, test API keys that still work

3. Framework defaults that expose endpoints

Many frameworks ship diagnostic or documentation endpoints that are enabled by default and easy to forget in production — for example Spring Boot Actuator (/actuator/*), interactive API docs (/swagger-ui, /openapi.json, /graphql introspection), and health/metrics routes.

4. Third-party integrations and the data-flow blind spot

APIs increasingly act as conduits between systems you control and systems you do not: analytics platforms, payment processors, CRM syncs, partner feeds. Each integration is a place where sensitive data crosses a trust boundary. If the integration is not inventoried, you cannot answer basic questions: What data leaves? To whom? Under what auth? What happens if the partner is breached?

The Discovery Asymmetry

A crucial technical reality: attackers enumerate; defenders often only document. An attacker with a wordlist, a subdomain scanner, and certificate-transparency logs can discover hosts and routes the owning organization has genuinely forgotten. Tools and techniques such as DNS brute-forcing, CT-log mining, path/parameter fuzzing, and mobile-app traffic inspection routinely surface endpoints that never appeared in any internal catalog. Defenders who rely only on tribal knowledge and hand-maintained spreadsheets are structurally behind.

Real-World Impact

The following are genuine, publicly reported incidents where an old, undocumented, or poorly governed API surface was central to the outcome. Where public reporting does not pin down a precise figure, this lesson deliberately keeps the description qualitative rather than inventing numbers, and it does not attach CVE identifiers to breaches that were not tracked that way.

Case Study 1: Optus (Australia, 2022)

What happened: Australian telecom Optus disclosed a major breach affecting a large share of its customer base (public reporting described figures in the millions of records, including identity-document details). Reporting and subsequent regulatory action centered on an internet-facing API endpoint that was reachable without authentication.

Case Study 2: Peloton (2021)

What happened: Security researchers (Pen Test Partners) reported that several of Peloton's API endpoints returned user account information to unauthenticated or improperly authorized requests. The endpoints in question were not part of a well-governed, access-controlled surface.

Case Study 3: Partner / Lender API Exposing Credit Data (2021)

What happened: An independent researcher (Bill Demirkapi), in reporting later covered by Brian Krebs, found that a partner-facing API used in a lending workflow could return consumer credit-score information given only easily obtained identifiers. The sensitive functionality lived on a third-party / partner integration rather than the primary consumer-facing product.

Case Study 4: T-Mobile API Abuse (disclosed January 2023)

What happened: T-Mobile disclosed (in a regulatory filing) that an attacker abused a single API to retrieve data on a large number of accounts over an extended period before it was detected.

Prevalence and Statistics

Rather than cite precise percentages that cannot be independently verified, this lesson describes the shape of the problem as consistently reported by industry practitioners and analysts:

Takeaway on numbers: The precise percentage varies by report and methodology, but the direction is unanimous — the number of APIs an organization actually runs is reliably larger than the number it can account for. Treat any environment as guilty of sprawl until an active discovery process proves otherwise.

Common Misunderstandings

Myth 1: "It's not in our docs, so attackers can't find it"

Reality: Documentation is for defenders; attackers do not need it. Subdomain enumeration, certificate-transparency logs, path fuzzing, JavaScript-bundle analysis, and mobile-app inspection routinely reveal endpoints that appear in no public or internal documentation. Obscurity is not a control.

Myth 2: "We deprecated v1, so it's handled"

Reality: Deprecation is an announcement; decommissioning is an action. If /v1 still returns 200 OK, it is still part of your attack surface — often the most vulnerable part, because it stopped receiving patches. Verify with a request, not with a changelog.

Myth 3: "Non-production environments don't count"

Reality: Staging and QA systems are frequently seeded with real or realistic data and run with weaker controls. If they are internet-reachable, they are production from the attacker's point of view.

Myth 4: "The API gateway sees everything"

Reality: A gateway only governs traffic that is actually routed through it. Shadow services deployed directly, legacy hosts with their own ingress, and partner integrations can all bypass it. The gateway is necessary but not sufficient; you still need discovery to confirm nothing is running around it.

Myth 5: "Inventory is a one-time project"

Reality: An inventory is accurate only at the moment it is taken. Every deploy, every new microservice, every acquired company changes it. Inventory must be a continuous, automated process wired into CI/CD and external scanning — not a spreadsheet updated once a year.

Myth 6: "We don't expose old versions publicly, so version drift is fine"

Reality: Even internal-only old versions matter, because a foothold anywhere (SSRF, a compromised service, a leaked internal credential) turns internal endpoints into reachable targets. Consistent controls across all versions, internal or not, is the safe default.

How to Identify if You're Vulnerable

Ask these questions about your API estate:

If you cannot confidently answer "yes" to the first two questions, you almost certainly have inventory gaps to close.

Key Takeaways

  1. You can only protect what you know exists — inventory is the foundation every other control depends on.
  2. Deprecated is not decommissioned — verify old versions are truly offline.
  3. Shadow and zombie APIs are the real breach doors — they skip your defenses by definition.
  4. Non-production is production when it is internet-reachable with real data.
  5. Attackers enumerate faster than you document — automate discovery to keep up.
  6. Third-party data flows are part of your surface — inventory them too.
  7. Inventory is continuous, wired into CI/CD, not a periodic spreadsheet.

Next Steps