Bug Bounty — Bypassing Access Controls: How a Single Boolean Flag Exposed KYC Government IDs
A direct file-download endpoint accepted a client-supplied boolean flag that controlled whether an access check ran. By setting the flag to false, an unauthenticated attacker could download other users' KYC documents such as government IDs and selfies.
Published on medium.com
Hello, hackers! In this writeup, I want to share a high-severity vulnerability I discovered during a recent bug bounty hunt.
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 backend exposed the toggle for its authorization check as a client-controlled URL parameter, so the client could disable the check.
Impact
An unauthenticated attacker who knows a document's identifier could download KYC documents including government IDs, selfies and proof of address, and the same bypass worked across accounts.
What the attacker needed
Knowledge of a document identifier (UUID); no account needed
The fix
The requiredAccess parameter should be removed from the public API and access should be enforced server-side from the verified session, with short-lived signed URLs issued only after an ownership check.
How it was found
- Find the direct file endpoint that takes an image path and a requiredAccess flag.
- Send a request to that endpoint with the flag set to false and no cookies or Authorization header.
- Observe a 200 OK response containing the raw JPEG document.
- Repeat with the flag set to true to confirm the access check then blocks the request.
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.
Access control is the server deciding whether you are allowed to see something. Here the server let the person making the request say 'don't check my access' by putting a word in the web address. That meant anyone who knew or guessed a document's identifier could download private identity documents 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.