Security research2 min read
Forgotten API routes: the endpoints your app still serves
Every rewrite an agent makes can leave an old route behind. The interface forgets it. The server does not.
Key takeaways
- Iterating with an agent often adds a new route rather than editing the old one, so old routes pile up.
- Forgotten routes miss later fixes: the new route gets the auth check, the old one does not.
- OWASP lists this as API9:2023 Improper Inventory Management.
- Build an inventory from real traffic, then probe for the routes that traffic does not explain.
How forgotten routes happen
Ask an agent to change how user profiles load and it may write /api/v2/profile alongside the old /api/profile rather than edit it in place. Ask it to add seed data for testing and it may add /api/debug/seed. Each step works, the interface moves on, and nothing removes what it left behind.
Over a few weeks of iteration, the set of routes the server answers drifts away from the set the interface calls. OWASP calls this improper inventory management: you cannot secure endpoints you do not know you have.
Why they are dangerous
- They miss later fixes. When you add an ownership check to the new route, the old one keeps returning everything.
- They were often written for convenience: test helpers, admin shortcuts, and seed endpoints with no authentication.
- Nobody looks at them. They do not appear in the interface, in recent diffs, or in manual testing.
How to find them
- Record every request the interface makes while you click through each screen. That is your known inventory.
- List the routes your server actually defines, from the framework's route table or file tree.
- Anything in the second list but not the first is a candidate. Decide whether to delete it or protect it.
- Probe the production host for common leftovers such as
/debug,/admin,/.env,/actuator,/swagger.json, and/graphql.
curl -s -o /dev/null -w "%{http_code} /debug\n" https://your-app.example/debug
curl -s -o /dev/null -w "%{http_code} /.env\n" https://your-app.example/.envWhere Routelint fits
Routelint's API catalog is the traffic-based inventory from step one. Its sensitive paths suite runs the probe from step four. Every captured route is then replayed with no session and as a peer, so an old route that skipped the new auth check shows up as a finding.
Routelint records the API calls your running app makes, then replays them with no session and as a second account. One scan needs no account.
Sources
- API9:2023 Improper Inventory Management — OWASP API Security Top 10
- API5:2023 Broken Function Level Authorization — OWASP API Security Top 10
Published November 1, 2026 by the Routelint team.
