Deprecated API Versions Still Accessible

Older or deprecated versions of the API remain deployed and reachable alongside the current one, without the security fixes and controls added since.

SeverityMedium
CVSS 3.15.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N Open in the calculator
CVSS 4.05.3 CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N Open in the calculator
CWECWE-424: Improper Protection of Alternate Path
OWASP Top 10A01:2025 Broken Access Control
MITRE ATT&CKT1190 Exploit Public-Facing Application
CategorySecurity Misconfiguration

Description

When an API is versioned, older versions are often left running after clients move to a new one, either deliberately for a transition period or because no one owns their retirement. The same applies to beta, staging and test versions published on production hosts. These versions usually share the same data but not the same code: security fixes, authorisation checks, input validation and rate limits added to the current version are not carried back.

An attacker can therefore bypass security controls added to the current API by sending the same request to an older version, for example to reach other users' data where an authorisation flaw was fixed only in the newer version, or to avoid rate limits on sign-in. Old versions may also run unpatched components, and may be missing from monitoring, from the gateway's policies and from the inventory of what is exposed, so abuse can go unnoticed. The impact depends on what the old version lacks: where it has the same controls as the current one, the finding is mainly one of unnecessary exposure, while a missing authorisation check would make it high.

The weakness is identified by looking for version indicators in paths, subdomains, headers and parameters (for example /v1/ alongside /v3/, an api-version parameter, or a version in the Accept header), in older releases of mobile applications and in documentation, and by requesting lower and adjacent versions of current endpoints. Each older version found is then tested for the weaknesses fixed in the current one, such as an authorisation check, rate limit or validation rule that the old version lacks.

Remediation

Keep an inventory of every API version and retire old ones on a schedule:

  • Record each API, version, environment and host in an inventory with an owner, the clients that use it and a retirement date, and update it as part of each release.
  • Announce deprecation in documentation and in responses (for example with the Sunset header), then remove retired versions from routing and decommission them, rather than leaving them reachable.
  • Until a version is retired, apply security fixes to every live version, and route all versions through the same gateway policies for authentication, authorisation, rate limiting and logging.
  • Keep beta, test and staging versions off production hosts and away from production data.
  • Monitor traffic to deprecated versions to identify the remaining clients and any unexpected use.

As an interim measure, block access at the gateway to versions with known weaknesses. Confirm the fix by requesting the retired versions again and checking that they are no longer reachable, and by repeating the earlier tests against any version that remains.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More APIs Findings

Every APIs finding