First Bug Bounty Program Found Cors Cross Origin Resource Sharing Misconfiguration
The web application reflected arbitrary Origin headers in the Access-Control-Allow-Origin response header and also set Access-Control-Allow-Credentials to true. An attacker could host a malicious site that makes credentialed requests to the vulnerable application and reads the responses, potentially accessing sensitive user information.
Published on systemweakness.com
Hello fellow Security researchers and beginners , in this blog I will be explaining the CORS vulnerability and how I found a potential vulnerability along techniques and exploit.
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 server dynamically reflects the Origin header value into Access-Control-Allow-Origin without validating it against an allowlist, and also enables credentials.
Impact
An attacker could use the victim's credentials to read sensitive information from the vulnerable site, but the text does not demonstrate a full exploit against a live target.
What the attacker needed
Victim visits attacker-controlled page; victim logged into vulnerable site
How it was found
- Capture the request in a proxy.
- Add a malicious URL as the Origin header.
- Send the request.
- Observe the response reflecting the malicious origin in Access-Control-Allow-Origin.
- Observe Access-Control-Allow-Credentials set to true.
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.
CORS is a browser mechanism that lets a website say which other websites are allowed to read its responses. Here the site trusted any website, so a malicious page could ask the browser to fetch private data from the vulnerable site using the victim's logged-in cookies and then read that data. This is dangerous because it bypasses the same-origin policy, a rule that normally stops one site from reading another site's data.
What is CORS?
A permissive cross-origin policy lets another site read responses with the user's credentials.