Chaining CSRF and an Open-Redirect leads to sensitive information disclosure
A subdomain's OAuth redirect endpoint had an open redirect and lacked CSRF protection, and a profile endpoint had a CORS misconfiguration allowing cross-origin reads. An attacker could chain these to force a victim to authenticate on the subdomain and then steal their personal data via a cross-origin request.
Published on medium.com
This exploit was submitted to a public program. It demonstrates how seemingly innocuous vulnerabilities can be chained together to escalate impact.
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 OAuth redirect endpoint failed to validate the redirectTo parameter and did not enforce CSRF protections, while the profile endpoint reflected arbitrary origins in its CORS policy and allowed cookies to be sent cross-site.
Impact
An attacker could steal sensitive personal information (full name, address, phone number, driver's licence number) from users who are logged in, and could force users who had never used the third-party service to log in and expose their data.
What the attacker needed
Victim is logged in or can be forced to log in; victim visits attacker's site
The fix
The report recommends implementing an allow-list for CORS origins, validating the redirectTo parameter to exclude external domains, and adding CSRF protection such as referer checks and tokens.
How it was found
- Victim visits the attacker's malicious site.
- The open redirect is used to force authentication on the third-party site and redirect back to the attacker's site.
- Profile data is stolen via a CORS request to the profile endpoint.
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.
This report shows how two small flaws combine into a bigger one. An open redirect lets a site send you to any address, and a CORS misconfiguration lets another website read data from the vulnerable site. Together, an attacker can trick you into logging in and then steal your profile details.
What is CORS?
A permissive cross-origin policy lets another site read responses with the user's credentials.