Sensitive Data Leak using Cors Misconfiguration in prominent Domain Registrar
Several API endpoints of a domain registrar validated the Origin header with a regex that only checked the value ended with the company's domain, so an attacker-controlled origin ending in that string was trusted. A malicious page could then read authenticated cross-origin responses such as the victim's basket, contact details, payment data and social connections.
infosecwriteups.com
Published on infosecwriteups.com
This article is about Cors misconfiguration bug which i found in different api endpoints/api subdomains of prominent domain registrar. I worked with this program for almost more than year and reported totally 25 bugs which secured me 7th rank on their Global Leaderboard.
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 Origin header was compared with a regex that only required the value to end with the trusted domain, instead of matching the full host exactly.
Impact
An attacker could read a logged-in victim's basket contents, phone, email, address, payment details, social connections and campaign data, and could perform SEO operations on the victim's behalf.
What the attacker needed
Victim is logged in; victim visits attacker page; attacker controls a lookalike domain
How it was found
- Set up a local web server and point a test hostname at it, then place the proof-of-concept page there.
- Log in as a victim in the browser and open the proof-of-concept page in another tab.
- The page fetches the basket API with credentials included and forwards the response to an attacker-controlled server.
- Observe the victim's data arriving at the attacker server.
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.
Browsers normally block a page on one site from reading data from another site, unless the target site explicitly allows it through a mechanism called CORS. Here the site's allow-list check was too loose, so a lookalike domain the attacker controls was treated as trusted and the attacker's 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.