Critical Bypass CSRF protection
The email change endpoint used a GET request without a CSRF token, and the Referer header check could be bypassed by hosting a page whose path contained the valid IBM URL. An attacker could change a victim's email address by tricking them into visiting a malicious site.
Published on medium.com
{{media:0}}
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 application used a GET request for a state-changing action and relied solely on a Referer header check that could be bypassed by crafting a URL with the trusted domain in the path.
Impact
An attacker could change a victim's email address, potentially leading to account takeover, by tricking the victim into visiting a malicious website.
What the attacker needed
Victim is logged in; victim visits attacker's website
How it was found
- Notice that changing email uses a GET request with the new email in the URL.
- Observe that there is no CSRF token, but a Referer header check blocks exploitation.
- Find that a Referer value containing the valid IBM profile-edit URL is accepted.
- Bypass the check by hosting a page at a path that includes the valid IBM URL, so the Referer sent from that page passes the check.
- Use this method to change a victim's email by getting them to visit the attacker's site.
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.
CSRF (Cross-Site Request Forgery) is when a malicious website makes a logged-in user's browser send a request to another site without the user knowing. Here, the email change happened via a simple link (GET request) with no secret token, and the site only checked the 'Referer' header (which tells where the request came from). The attacker bypassed that check by putting the trusted URL inside their own site's path, so the browser sent a Referer that looked valid.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.