JWT Authentication Bypass leads to Admin Control Panel
A JWT used for authentication was accepted even after the author changed fields inside it, such as the nickname and user identifier, because the token had no algorithm and the signature was not properly enforced. The author used this to perform an admin action and reach the admin control panel.
infosecwriteups.com
Published on infosecwriteups.com
I found this vulnerability about a few months ago, it was a “simple” mistake that I managed to access the Admin panel of a very well-known site. And I have permission to publish this…
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 token was issued without a signing algorithm and the server did not verify the signature, so modified token contents were trusted.
Impact
An attacker could modify their own token and carry out admin actions, potentially reaching the admin control panel.
What the attacker needed
A free account; ability to intercept and edit requests
The fix
The token should be signed with a proper algorithm and the server should reject any token whose signature does not match.
How it was found
- Visit the site and note that no JWT is issued while logged out.
- Create an account and observe the authentication cookie being set.
- Decode the token to view its fields.
- Change the nickname and user identifier inside the token.
- Send the modified token and observe it is still accepted.
- Perform an admin action using the modified 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.
A JWT is a small piece of data a site gives you after login to prove who you are; it normally carries a signature so the server can tell if anyone tampered with it. Here the server did not properly check that signature, so the author could edit the token's contents and still be trusted, which let them act as an 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.