Skip to content
CORS Write-up Intermediate

Cross-Origin Resource Sharing (CORS) Misconfiguration leads to User’s PII leaks.

The site's API server reflected the request origin in its CORS response headers, so any website could read authenticated responses. An attacker could host a page that makes a victim's browser fetch the API and leak the victim's personal data.

Tarikul Islam Follow

Published on sa1tama0.medium.com

I’m Tarikul Islam, a Cyber Security Researcher from Sec Miner’s Bangladesh.

Tarikul Islam, on sa1tama0.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 API reflected the incoming Origin header (or accepted a null origin) in its CORS response without checking it against an allowlist, while also allowing credentials.

What the attacker needed

Victim is logged in; victim visits attacker page

How it was found

  1. Create an account on the target and browse the web pages.
  2. Review the Burp Suite history and notice the session-based API server responses.
  3. Test a CORS exploit locally, which worked.
  4. Upload the exploit to a VPS, where it failed because of the protocol difference.
  5. Switch to a null origin payload and upload it to the VPS.
  6. The exploit then worked successfully.

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.

When a browser loads a page from one site, it normally blocks that page from reading data from another site. CORS is the rule that lets a site say which other sites may read its data. Here the server trusted whatever site asked, so a malicious page could read the victim's private account data.

What is CORS?

A permissive cross-origin policy lets another site read responses with the user's credentials.

More by Tarikul Islam

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

CORS misconfiguration

The lesson behind this report.

A permissive cross-origin policy lets another site read responses with the user's credentials.