This article is Day 17 of a 60-day bug bounty mastery course focusing on JWT (JSON Web Token) authentication vulnerabilities that enable complete authentication bypass. It covers four distinct attack vectors—alg:none signature removal, algorithm confusion converting RS256 to HS256, weak HMAC secret cracking, and kid parameter injection—with hands-on exercises using tools like Hashcat, jwt.io, Burp Suite, and jwt_tool. JWT vulnerabilities are presented as among the highest-severity findings in bug bounty programs because successful exploitation allows attackers to impersonate any user, including administrators, without knowing credentials.
- JWT Structure and Attack SurfaceEvery JWT contains three Base64url-encoded sections: header (specifying the signing algorithm), payload (containing claims like user ID, role, permissions, and expiry), and signature (a cryptographic hash protecting integrity). JWT attacks target either bypassing signature verification entirely or forging valid signatures by exploiting flaws in how the algorithm field or verification logic is implemented. If an attacker can produce a valid signature for a modified payload, they control every claim including admin flags and permission levels.
- The alg:none Attack MechanismThe JWT specification defines 'none' as a valid algorithm value meaning no digital signature is required. Vulnerable implementations skip signature verification when encountering alg:none and accept token claims at face value. Attackers remove the signature entirely, set the algorithm header to 'none', modify payload claims (such as changing role from 'user' to 'admin'), and submit the token as [new_header].[new_payload]. with an empty signature section. Case variants like 'None', 'NONE', and 'nOnE' bypass some filter implementations.
- Algorithm Confusion with Public KeysThis attack exploits implementations supporting both RS256 (asymmetric: private key signs, public key verifies) and HS256 (symmetric: single secret signs and verifies). An attacker changes the algorithm from RS256 to HS256 in the token header, then re-signs using the server's RSA public key as the HMAC secret. Vulnerable servers verify the HS256 signature using their stored RSA public key—which the attacker also used to sign. Public keys are often accessible from endpoints like /.well-known/jwks.json, making this attack feasible without private key access.
- Weak Secret Cracking with HashcatHMAC-signed JWTs with weak secrets can be cracked using Hashcat mode 16500 (JWT HS256/HS384/HS512 cracking). Common production secrets are literally 'secret', 'password', '123456', or environment variable names like 'JWT_SECRET'. Testing a focused wordlist of common weak secrets before running against full dictionaries like rockyou.txt typically recovers the secret in seconds. Once the secret is recovered, an attacker can forge any token claims and sign them validly, enabling complete user impersonation.
- kid Parameter Injection AttacksThe kid (Key ID) header parameter tells the server which key to use for verification. If the application uses the kid value unsafely as a file path or database query, attackers can exploit path traversal or SQL injection through the JWT header itself. A path traversal example uses kid='../../../../../../dev/null' (reading as empty string) and signs with an empty HMAC secret; SQL injection via kid might inject 'x' UNION SELECT 'attacker_key' -- -' to cause the database to return an attacker-controlled key for verification. This attack surface bypasses WAFs and standard input validation.
- Proof of Concept Structure for Critical SeverityThe ideal JWT vulnerability PoC follows four steps: (1) capture and decode a legitimate user JWT showing the role claim, (2) execute the attack (alg:none, algorithm confusion, or cracked secret), (3) produce a forged token with role or sub modified, (4) send a request to a privileged endpoint with the forged token and screenshot the admin response. This progression demonstrates full authentication bypass rather than just finding a vulnerability, which is the difference between Medium and Critical payouts in bug bounty programs.
- JWT Analysis as Prerequisite Attack StepDecoding and analyzing JWTs at jwt.io is the mandatory first step before executing any attack. Analysis reveals: the algorithm field (HS256 suggests weak secret cracking; RS256 suggests algorithm confusion), all claims in the payload (identifying which fields like 'role' or 'admin' to target), expiry times, and special header parameters like kid, jku, or x5u that signal additional attack surfaces. Which endpoints issued the token and which endpoints consume it must also be documented to target the right requests.
- Common JWT Locations and InterceptionJWTs are transmitted in Authorization headers as 'Authorization: Bearer [token]', in cookies like 'session=[token]' or 'token=[token]', or in request bodies as JSON like '{"token": "eyJ..."}'. DevTools Network tab shows the 'Authorization: Bearer eyJ...' pattern, and Burp Suite request history can be searched to locate all JWT instances across an application, mapping which endpoints issue and consume them.
Bottom line: JWT vulnerabilities enable complete authentication bypass and consistently earn Critical severity in bug bounty programs because an attacker can impersonate any user including administrators without credentials. The four attack vectors—alg:none, algorithm confusion with public keys, weak HMAC secret cracking via Hashcat, and kid parameter injection—cover the complete JWT attack surface and can be executed with freely available tools like jwt.io, Burp JWT Editor, and jwt_tool, with success typica
FREE
Part of the 60-Day Bug Bounty Mastery Course
🎯 What You’ll Master in Day 17
⏱️ 50 min read · 3 hands-on exercises
📋 What You’ll Master — JWT Attacks Bug Bounty 2026
- JWT Structure — What You Are Actually Attacking
- The alg:none Attack — Removing Signature Verification
- Algorithm Confusion — RS256 to HS256 with the Public Key
- Weak Signing Secrets — Cracking HMAC with Hashcat
- kid Parameter Injection — Path Traversal and SQL in Headers
- Severity and Reporting JWT Vulnerabilities in Bug Bounty
In Day 16 you tested rate limiting on authentication endpoints. JWT vulnerabilities sit one layer deeper — instead of attacking the authentication process itself, you attack the authentication token after it has been issued. Together, rate limit bypasses and JWT attacks form a complete authentication attack chain in the 60-Day Bug Bounty Mastery Course.
JWT Structure — What You Are Actually Attacking
Every JWT consists of three Base64url-encoded sections separated by dots: header.payload.signature. The header specifies the algorithm used for signing. The payload contains the claims — user ID, role, permissions, expiry. The signature is a cryptographic hash of the encoded header and payload, produced using a secret key.
The entire security model of JWT depends on the signature being unforgeable. If you can produce a valid signature for a modified payload, or bypass signature verification entirely, you control every claim in the token — including admin flags, user IDs, and permission levels. JWT attacks target exactly this: either bypassing verification or forging valid signatures.
“alg”: “HS256”,
“typ”: “JWT”
}
“sub”: “user_1234”,
“role”: “user”, ← Change to “admin”
“exp”: 1744243200
}
⏱️ Time: 10 minutes · Browser only · jwt.io
Step 2: Log into any application in a bug bounty programme scope
that uses JWT authentication (check for “Authorization: Bearer eyJ…”
in DevTools Network tab, or a cookie containing “eyJ”)
Step 3: Copy the full JWT token value
Step 4: Paste it into jwt.io — observe:
– What algorithm is used? (HS256, RS256, ES256?)
– What claims are in the payload? (sub, role, admin, email?)
– Is there an “exp” claim? When does it expire?
– Is there a “kid” or “jku” or “x5u” header parameter?
Step 5: In jwt.io, try modifying the payload:
– Change any role value (“user” → “admin”)
– Change any user ID
Note: jwt.io will show “Signature Invalid” — that’s expected
Step 6: Now go to Burp Suite (if open) or DevTools
Search your request history for the JWT in:
– Authorization: Bearer [token]
– Cookie: session=[token] or token=[token]
– Request body: {“token”: “eyJ…”}
Step 7: Document for each JWT found:
– Which endpoint issued it?
– Which endpoints consume it?
– What sensitive claims does it contain?
📸 Screenshot your decoded JWT showing the claims and algorithm type and save it in your notes.
The alg:none Attack — Removing Signature Verification
The alg:none attack exploits JWT implementations that follow the specification too literally. The JWT standard defines “none” as a valid algorithm value meaning “no digital signature.” Vulnerable libraries, when they encounter alg:none, skip signature verification and accept the token’s claims at face value. The attacker removes the signature entirely and sets any payload claims they want.
Algorithm Confusion — RS256 to HS256 with the Public Key
Algorithm confusion exploits the misuse of asymmetric JWT algorithms. RS256 uses a private key to sign and a public key to verify — the public key is safe to share. But if the server’s JWT library supports both RS256 and HS256, and an attacker changes the algorithm from RS256 to HS256 in the token header, some vulnerable implementations will verify the signature using the RSA public key as the HMAC secret. The public key is often accessible — from an endpoint like /.well-known/jwks.json or embedded in the application. The attacker can then sign any forged token with the public key and the vulnerable server will accept it.
Weak Signing Secrets — Cracking HMAC with Hashcat
⏱️ Time: 20 minutes · Free PortSwigger account
Step 2: Open the lab: “JWT authentication bypass via unverified signature”
Step 3: This lab’s server does not verify JWT signatures at all
— just decode and modify the payload
Step 4: In Burp, intercept a request with the JWT
Step 5: Go to the JWT tab (requires JWT Editor extension) in Repeater
Step 6: Change the “sub” claim from your username to “administrator”
Step 7: Send the request — you should get admin access
Step 8: Next try: “JWT authentication bypass via flawed signature verification”
Step 9: This lab has the alg:none vulnerability
— set algorithm to “none” and remove the signature
Step 10: Try: “JWT authentication bypass via weak signing key”
— crack the secret with:
hashcat -a 0 -m 16500 TOKEN /usr/share/wordlists/rockyou.txt
Use the cracked secret to forge an admin token in jwt.io
For each lab, document:
– What was the vulnerability?
– What claim did you modify?
– What response confirmed admin access?
📸 Screenshot admin access achieved in each lab and save it in your notes.
kid Parameter Injection — Path Traversal and SQL in Headers
The kid (Key ID) header parameter is an optional JWT field that tells the server which key to use for signature verification. If the application uses the kid value as a file path or database query to retrieve the verification key, it is vulnerable to path traversal or SQL injection through the JWT header itself — an attack surface that WAFs and standard input validation almost never cover.
⏱️ Time: 15 minutes · Kali terminal + jwt.io
📸 Screenshot hashcat cracking the secret and jwt.io showing the forged valid token and save it in your notes. Tag #jwtattacks2026
Severity and Reporting JWT Vulnerabilities in Bug Bounty
JWT vulnerabilities consistently earn Critical ratings in bug bounty programmes because they enable complete authentication bypass — an attacker can impersonate any user, including administrators, without knowing any credentials. The severity is not theoretical. Your PoC should demonstrate forged admin access directly.
The ideal PoC structure: (1) capture a legitimate user JWT and decode it, showing the role claim; (2) execute the attack (alg:none, algorithm confusion, or cracked secret); (3) produce the forged token with role or sub modified; (4) send a request to a privileged endpoint with the forged token and screenshot the admin response. This four-step progression takes the programme from “JWT vulnerability found” to “demonstrated full authentication bypass” — the difference between a Medium and Critical payout.
🧠 QUICK CHECK — Day 17
/.well-known/jwks.json endpoint returns the server’s RSA public key. When you change the algorithm to HS256 in the JWT header and re-sign with the public key as the HMAC secret, the server returns a 200 response with admin data. What is this attack and why does it work?
📋 JWT Attack Checklist — Day 17
🏆 Mark Day 17 as Complete
JWT vulnerabilities are among the highest-paying findings in bug bounty. The four attack types you learned today — alg:none, algorithm confusion, weak secret, and kid injection — cover the complete JWT attack surface. Each one can produce Critical authentication bypass with the right PoC.
❓ Frequently Asked Questions
What is a JWT and how is it used in authentication?
What is the JWT alg:none attack?
What is JWT algorithm confusion?
How do I crack a JWT secret for bug bounty?
What JWT tools are available in Burp Suite?
Day 16: Rate Limiting Bug Bounty 2026
Day 18: OAuth 2.0 Bug Bounty 2026
📚 Further Reading
- Rate Limiting Bug Bounty 2026 — Day 16 covers rate limit bypass — the authentication attack layer that chains with JWT vulnerabilities when combined with brute force against token endpoints.
- 60-Day Bug Bounty Mastery Course — The complete course hub — Day 17 JWT attacks sit within the authentication vulnerability phase alongside rate limiting, OAuth, and CSRF covering Days 16–20.
- PortSwigger JWT Attack Labs — Eight progressive JWT labs covering unverified signatures, alg:none, weak secrets, algorithm confusion, and kid injection with a working lab environment for every technique.
- jwt_tool GitHub Repository — The definitive JWT attack toolkit — automated all-attack mode, algorithm confusion, kid injection, and secret brute force with detailed output for bug bounty reporting.
- jwt.io — JWT Decoder and Encoder — The standard JWT analysis tool — decode any token, modify claims, and verify or forge signatures with known secrets directly in the browser.

