Skip to content
OAuth / SSO Write-up Intermediate

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.

T4nv1 Follow

Published on medium.com

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.

T4nv1, on medium.com

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

  1. Send an OAuth authorization request with a redirect_uri containing the legitimate domain followed by a backslash and an attacker domain.
  2. Observe that the server accepts the request and shows the login page instead of rejecting it.
  3. After the victim logs in, the server issues a redirect to the crafted URI.
  4. The victim's browser normalises the backslash and navigates to the attacker's domain, sending the authorization code.
  5. 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.

More by T4nv1

View all

113 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

OAuth and single sign-on flaws

The lesson behind this report.

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.