Skip to content
Access control Write-up Intermediate

Bypassing Authentication in a Major API Gateway: A Path Normaliza

The API gateway failed to normalise request paths before applying authentication filters, so a path with a double slash was not recognised as protected. An attacker could bypass authentication and access sensitive admin endpoints on the backend.

Dipanshu Chhanikar Follow

Published on medium.com

API gateways are the front door for modern microservice architectures. They handle routing, rate-limiting, and, most importantly, authentication.

Dipanshu Chhanikar, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The gateway's URI preparation method did not normalise the path before the authentication filter compared it against protected patterns.

Impact

An attacker could access any endpoint protected by the API gateway, leading to sensitive data disclosure and potential privilege escalation.

What the attacker needed

Network access to the API gateway

The fix

The path should be normalised before any security filters are applied, for example by removing consecutive slashes and resolving dot segments.

How it was found

  1. Send a request to a protected path using a double slash at the start.
  2. The gateway's URI preparation leaves the path unchanged.
  3. The authentication filter checks if the path starts with the protected prefix and finds no match.
  4. The request is forwarded to the backend without authentication.
  5. The backend normalises the path and serves the sensitive admin data.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

An API gateway is a front door that checks who is allowed to see which parts of a website. It was checking the address exactly as typed, so a slightly different address slipped past the check, but the server behind it treated it as the protected page. That let someone see private admin information without logging in.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Dipanshu Chhanikar

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.