h PAR: How a Simple CORS Misconfiguration Led to a Full Account T
The PAR endpoint reflected any Origin header while allowing credentials, so a malicious site could read the victim's freshly generated request_uri. The attacker could then use that URN to obtain an OAuth authorization code and take over the victim's account.
It is the ultimate bug hunter heartbreak. You spend hours tearing apart a complex FinTech application, bypass a notoriously strict Web Application Firewall, completely compromise their core authentication flow, submit a bulletproof Critical-severity report… and get hit with “Duplicate.”
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 PAR endpoint reflected the request's Origin header in Access-Control-Allow-Origin while also setting Access-Control-Allow-Credentials to true, instead of allowing only trusted origins.
Impact
An attacker could take over a victim's account by stealing a PAR URN and exchanging it for an OAuth authorization code, though the report notes the endpoint was behind an aggressive WAF that blocked automated tools.
What the attacker needed
Victim has an active session; victim visits attacker-controlled site; attacker can host a malicious website
The fix
The endpoint should only allow explicitly trusted origins in CORS responses and should not reflect arbitrary Origin headers with credentials enabled.
How it was found
- Intercept the POST request to the PAR endpoint and change the Origin header to an attacker-controlled domain.
- Observe that the server reflects that origin and allows credentials.
- Host a malicious site that sends a background cross-origin request to the PAR endpoint.
- Trick a logged-in victim into visiting the malicious site so their cookies are attached.
- Read the response to extract the generated request_uri.
- Pass the stolen URN to the authorization endpoint to obtain an OAuth authorization code.
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 website's browser normally stops one site from reading another site's private responses. Here the login server told the browser to allow any website to read its replies, even when the victim's cookies were sent. That let an attacker's page steal a login token and finish the victim's login as the attacker.
What is CORS?
A permissive cross-origin policy lets another site read responses with the user's credentials.