Field manual · BAC · Chapter 5
Transport Tricks
Same route, different doors
Chapter 5: transport tricks: same route, different doors
Section titled “Chapter 5: transport tricks: same route, different doors”Why care: you can bypass an authorization check bound to a route. Shape the request so the router and the authz layer disagree about which route it is. The authorization middleware attaches to routes, and routers parse paths in quirky ways. The IDOR deep-dive covers the same family. For BAC, the exploits target route permissions:
| Trick | Bypass mechanism |
|---|---|
Method swap: PATCH blocked? try PUT, POST with X-HTTP-Method-Override: PATCH |
middleware per-verb, not per-route |
Case: /ADMIN/users or /Admin/users |
routers that treat paths case-insensitively, authorization didn’t |
Semicolon path params: /api/users;role=admin/1042 or /;/admin, the Spring ; classic: DELETE /admin/users;, some gateways strip ;... before matching, middlewares see different URL than backend (extremely common Java pattern; see also CRLF, Carriage Return Line Feed, header-injection tricks) |
router-ahead-of-authz parsing mismatch |
Trailing slash / double slash: /admin//users, /admin/users/ |
route regex differences |
Extension confusion: /admin/users.json, /admin/users/ |
content-negotiation bypass |
Encoded traversal: /api/%2Fadmin%2Fusers, /api/./admin/users, /api/v1/../v2/admin/users |
URL-normalization mismatch between gateway and backend |
| HTTP/2 or header-splitting quirks | new one every year, same concept |
The meta-lesson: a check that lives in the router or middleware can be tricked. Two components each see the request differently, and the authorization layer is the one that guesses wrong about the route, method, or shape.
And the classic, worth its own entry:
HTTP Parameter Pollution (HPP):GET /api/account?role=user&role=admin→ Some frameworks (parameter arrays) take the FIRST occurrence for routing logic and a DIFFERENT middleware after parses the LAST occurrence for authorization.Older gateway platforms are especially exposed, but HPP shows up in modern apps too.Next step: Chapter 6 covers the same idea inside a single GraphQL endpoint, where the router trick is a resolver that forgot to check.
Open local graph around this page
Linked from here
Links out to
No outgoing internal links on this page.
Broken Access ControlFor authorized security research only: bug bounty programs, your own systems, or scoped engagements with written permission.