How a Single “Backslash” Smashed Through a Global Retailer’
The OAuth redirect URI validation used simple string matching that accepted a backslash after the legitimate domain, while browsers treat the backslash as a path separator and navigate to the attacker's domain. An attacker could capture the victim's authorization code and exchange it for full account access.
OAuth 2.0 is the backbone of modern web authentication. It’s the magic infrastructure that lets you click “Sign in with Google” or “Log in with Apple” instead of creating your 400th unique password.
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
Impact
An attacker could take over a victim's account, including saved credit cards, addresses, and order history, with only a single click on a legitimate-looking login link.
What the attacker needed
Victim clicks a crafted login link; attacker controls an external server
The fix
The issue was fixed by replacing custom string-matching with a hardened native URL parsing library that treats backslashes as invalid or normalises them before whitelist validation.
How it was found
- Send an OAuth authorization request with a redirect_uri containing the legitimate domain followed by a backslash and an attacker domain.
- Observe that the server accepts the request and shows the login page instead of rejecting it.
- After the victim logs in, the server issues a redirect to the crafted URI.
- The victim's browser normalises the backslash and navigates to the attacker's domain, sending the authorization code.
- Capture the code on the attacker server and exchange it at the real backend for a session token.
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.
OAuth is a way to log in using another service, like 'Sign in with Google'. The service sends a secret code back to a website you trust, but only if the address matches an approved list. Here, the check was fooled by a backslash character, so the secret code went to the attacker's website instead.
What is OAuth / SSO?
Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.