Skip to content

Field manual · BAC · Chapter 5

Transport Tricks

Same route, different doors

1 min readBroken Access Control

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.

Connections5 backlinks · 0 outgoing · 4 cross-guideFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

Broken Access ControlFor authorized security research only: bug bounty programs, your own systems, or scoped engagements with written permission.