Skip to content
Access control Write-up Intermediate

I bypassed AWS API Gateway auth with a trailing slash. Got $12K bounty

A fintech's AWS HTTP API authorised requests against the original path but forwarded a rewritten trailing-slash path to the backend, so the authoriser's user context was dropped. An attacker could read all accounts and initiate transfers without a valid JWT.

theguptalog.blogspot.com

Published on theguptalog.blogspot.com

{{media:0}}

The author, on theguptalog.blogspot.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

Likely a mismatch between the gateway's greedy path matching and the integration's path rewrite, which stripped the authoriser context before the backend ran, and the backend did not validate the user identity itself.

Impact

An unauthenticated attacker could read all account data and initiate wire transfers, which defaulted to a system account when the user identity was missing.

What the attacker needed

Network access to the API; no valid JWT needed

The fix

The issue was fixed by moving to REST API with stricter path matching and by validating the user identifier in every Lambda, not just the authoriser.

How it was found

  1. Request the accounts endpoint without a trailing slash and observe a 401.
  2. Request the same endpoint with a trailing slash and observe a 200 with full account data.
  3. Fuzz the path to map which variants return 401, 200 or 404.
  4. Confirm the backend receives an undefined user identifier on the trailing-slash path.
  5. Repeat the bypass on the transfers endpoint and send a small test transfer.

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 is the door staff for a service: it checks your token before letting a request through. Here the door staff checked one version of the address while the request was quietly rewritten to another, so the backend ran without knowing who you were. Because the backend never checked the user identity itself, it handed over everyone's data.

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.

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.