Skip to content
Access control Write-up Advanced

Secondary Context Leads To Company Takeover.

The frontend API enforced authentication and authorisation, but the backend API did not, and path traversal in the frontend path allowed direct access to backend endpoints. This let the researchers reach an internal super-admin login, enumerate usernames, brute-force a password, and take over over 3,000 companies, as well as bypass KYC checks and access employee PII and fingerprints.

Berserker1337 Follow

Published on medium.com

How meand Omar found a secondary context that allowed us to take over the whole company. I will list down what we found within our approach in the target.

Berserker, 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

Likely the frontend API did not sanitise request paths and the backend API normalised paths differently, so authentication and authorisation checks applied only at the frontend were bypassed by direct backend requests.

Impact

An attacker could take over the super-admin panel controlling over 3,000 companies, access employee PII and fingerprints, retrieve customer invoices by mobile number, bypass KYC to transfer any phone number, and bypass over 20 previously fixed access-control reports; the WAF on the main domain blocked path traversal but a separate production domain without a WAF allowed the bypass.

What the attacker needed

Access to the target web application; Discovery of a production domain without a WAF; A POST request vulnerable to path traversal; Custom password wordlist for brute force

How it was found

  1. Send a request with special characters after the path and observe that the error response reveals a longer backend API path.
  2. Find a production domain in a JavaScript file that uses the same API and database but has no WAF.
  3. Use path traversal on that domain and confirm a different 404 response, indicating the backend API was reached.
  4. Fuzz the backend and find an application.wadl file listing internal endpoints for the payment microservice.
  5. Request an order document endpoint and receive a PDF containing employee PII and fingerprints.
  6. Find a POST request vulnerable to path traversal, reach the internal super-admin login, enumerate usernames, and brute-force the password with a custom wordlist to obtain a super-admin token.

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.

A company's website often has a front door (the frontend API) that checks who you are, and a back door (the backend API) that does the real work. Here the front door checked permissions but the back door did not, so by crafting a special web address the researchers could walk straight past the front door and talk to the back door directly. That let them see private employee documents and even log in as a super administrator.

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 Berserker1337

View all

2 more disclosed reports, 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.