Blog / A01:2021 Broken Access Control
A01:2021 · Broken Access Control

The old endpoint you deprecated is still answering calls

You shipped a hardened v2 and left the original route wired up. Attackers read your comments too, and the legacy path skips every check you added.

attacker findsthe retired routesends a legacyrequestold handler runswithout…operationcompletes…ATTACKER INPUTIMPACTcheck absent
Attack path · attacker finds the retired route → sends a legacy request → old handler runs without new checks → operation completes unvalidated

You shipped a hardened v2 and left the original route wired up. Attackers read your comments too, and the legacy path skips every check you added.

What goes wrong

A deprecation comment is documentation. It is not a control. The old route still accepts the same request shape and runs the original handler, and that handler never got the ownership and state checks that went into the replacement. Anyone who can reach the service can call it.

The reason this survives review is that the new code looks correct. Reviewers approve the new handler and move on. Nobody diffs it against the old one to notice the legacy route still resolves. Routing tables almost never get audited, so a retired path can answer requests for years.

The pattern

Vulnerable
// v2 added ownership and state checks
post("/link/v2", handleLinkV2)

// old route, marked "do not use" in a comment
post("/link", handleLinkLegacy)

function handleLinkLegacy(req):
    // no ownership check, no state check
    return store.link(req.source, req.target)
Hardened
// one handler, one set of checks
post("/link", handleLink)

function handleLink(req):
    requireOwner(req.caller, req.source)
    requireLinkable(req.target)
    return store.link(req.source, req.target)

// old path deleted; it now returns 404
How the pipeline adjudicated itHELD
ABCDEFGH

Grounding and reachability were confirmed. The exploit-path gate would not conclude without the calling code, so the finding was held and an evidence request was raised instead of being reported as fact.

Ed25519 · per-tenant signing key · gate ledger A–H · verify offline against the published payload hash

Why it matters to you

The gap stays invisible until someone hits the old URL. Traffic dashboards show new-endpoint usage climbing and the legacy path near zero, which reads as safe to leave alone. That quiet route is exactly what an attacker probes for. Every method you replace for security reasons is a liability for as long as the original stays callable.

Check your own code