Broken Authentication ability To Privilege Escalation via JWT Algorithm Manipulation
The backend did not properly validate the JWT signing algorithm, so a token's header could be changed to the 'none' algorithm and its payload edited to set the role to admin. An attacker could then reach admin-only endpoints and gain full administrative access without knowing any secret key.
2.Ambil JWT dari header Authorization: Bearer. Decode JWT (bisa pakai JWT.io atau extension Burp).
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 JWT library or verification code accepted the 'none' algorithm instead of pinning an expected signing algorithm and rejecting unsigned tokens.
Impact
An attacker could take over the administrator account, escalate privileges, read sensitive data of all users and modify system configuration.
What the attacker needed
A free account; ability to intercept HTTP requests
The fix
The server should pin the expected signing algorithm and reject tokens with the 'none' algorithm or an invalid signature.
How it was found
- Log in as a normal user and capture the request in an intercepting proxy.
- Take the JWT from the Authorization Bearer header and decode it.
- Change the header algorithm to none, change the payload role to admin, and remove the signature while keeping the trailing dot.
- Send the modified token to an admin endpoint such as the settings API.
- Observe that the server accepts the token and grants admin access.
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 a signed piece of text a server hands out after login to prove who you are. The signature stops people editing it, but only if the server checks which signing method was used. Here the server accepted a token that claimed to have no signature at all, so anyone could rewrite their own role to admin.
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.