Unauthorized access to all the user’s account.
The application issued a JWT containing the username and did not validate it properly, allowing the attacker to change the username in the token and gain access to any user's account. The attacker could view all data of the victim account.
Published on web.archive.org
Rahul Naidu
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 server did not verify the JWT signature and trusted the username claim in the token, allowing the attacker to modify it and impersonate other users.
Impact
An attacker could gain unauthorized access to any user's account and view all their data.
What the attacker needed
A free account; ability to intercept HTTP responses
The fix
The vulnerability was fixed within hours after being reported.
How it was found
- Create two accounts: a victim account and an attacker account.
- Log in with the attacker's credentials and capture the response containing the JWT.
- Decode the JWT and note that it contains the username.
- Change the username in the JWT payload to the victim's username and generate a new token.
- Replace the token in the response and forward it to the browser.
- Observe that the browser shows the victim's username but login is not complete; then change the username in the browser itself before forwarding, and successfully log in as the victim.
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 JSON Web Token (JWT) is like a digital ID card that a website gives you after you log in. The website should check that the ID card is real and hasn't been tampered with. Here, the website didn't check properly, so the attacker could change the name on the ID card and pretend to be someone else.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.