This article is Day 17 of a 60-day bug bounty mastery course focused on JSON Web Token (JWT) attacks—a high-severity vulnerability class affecting modern APIs and single-page applications. The course covers four distinct JWT attack vectors: alg:none signature removal, RS256-to-HS256 algorithm confusion using public keys, weak HMAC secret cracking with Hashcat, and kid parameter injection for path traversal and SQL injection. JWT vulnerabilities consistently earn Critical severity ratings because they enable complete authentication bypass, allowing attackers to impersonate any user including administrators without knowing credentials.
- JWT Structure and Attack SurfaceEvery JWT consists of three Base64url-encoded sections (header.payload.signature). The header specifies the signing algorithm; the payload contains claims like user ID, role, and permissions; and the signature is a cryptographic hash protecting token integrity. The entire security model depends on the signature being unforgeable—if an attacker can bypass verification or forge a valid signature, they control every claim in the token, including admin flags and permission levels. JWT attacks target either the algorithm field or the signature verification logic.
- The alg:none Attack MechanismThe JWT specification defines 'none' as a valid algorithm meaning no digital signature. Vulnerable libraries encountering alg:none skip signature verification entirely and accept token claims at face value. Attackers remove the signature completely, set any payload claims desired, and modify the algorithm field to 'none'. The article notes some filters can be bypassed using case variants like 'None', 'NONE', or 'nOnE'. This attack requires no cryptographic knowledge and gives complete control over all authentication claims with no valid signature required.
- Algorithm Confusion RS256 to HS256RS256 uses a private key to sign and a public key to verify—the public key is safe to share. If a server's JWT library supports both RS256 and HS256, an attacker can change the algorithm from RS256 to HS256 in the token header. Vulnerable implementations will then verify the signature using the RSA public key as the HMAC secret. Since the public key is often accessible from endpoints like /.well-known/jwks.json, attackers can sign forged tokens with this public key and the server will accept them. The attacker gains admin token generation capability using only publicly available information.
- Weak HMAC Secret Cracking WorkflowHS256-signed JWTs with weak secrets can be cracked using Hashcat mode 16500. The article provides a complete workflow: capture the token, run 'hashcat -m 16500 jwt_token.txt rockyou.txt' to crack the secret, then forge new tokens at jwt.io by modifying claims like role to 'admin' and signing with the recovered secret. Common JWT secrets in production are literally 'secret', 'password', '123456', or environment variable names like 'JWT_SECRET' matching the key name. The example in the article shows a financial services JWT cracked in under two seconds, enabling fund transfer authorization on be
- kid Parameter Injection AttacksThe kid (Key ID) header parameter 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 injection attacks. Path traversal via kid like '../../../../../../dev/null' can cause the server to use an empty string as the HMAC secret when /dev/null reads as empty. SQL injection via kid like 'x' UNION SELECT 'attacker_key' -- -' can cause the database to return an attacker-controlled key for signature verification. This attack surface is rarely covered by WAFs or stan
- Practical PoC Structure for Bug BountyThe article outlines the four-step PoC that consistently earns Critical ratings: (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 the forged token with role or sub modified to admin, (4) send a request to a privileged endpoint with the forged token and screenshot the admin response. This four-step progression demonstrates full authentication bypass rather than just theoretical vulnerability, making the difference between Medium and Critical severity payouts. The article emphasizes this is
- Automated Testing and Tool UsageThe article recommends multiple tools for JWT attacks: jwt.io for decoding and manual token modification in the browser, the Burp JWT Editor extension for one-click attack vectors including algorithm confusion and alg:none testing, jwt_tool (Python CLI) for automated all-attack mode that tests every JWT vulnerability vector, and Hashcat mode 16500 for HMAC secret cracking. jwt_tool's automated scan mode can test all JWT vulnerabilities systematically, while JWT Editor extension provides visual attack generation within Burp Repeater's JWT tab.
- Critical Severity Justification and ImpactJWT vulnerabilities consistently earn Critical ratings because they enable complete authentication bypass—an attacker can impersonate any user including administrators without knowing any credentials. The severity is not theoretical but demonstrated through working PoCs showing forged admin access. The article's real-world example from a financial services API operated undetected for six years with a secret cracked in seconds, enabling unauthorized fund transfer authorization on behalf of other users, illustrating that these vulnerabilities have severe real-world impact and high commercial val
Bottom line: JWT vulnerabilities are among the highest-paying bug bounty findings because they enable complete authentication bypass through four primary attack vectors: alg:none signature removal, RS256-to-HS256 algorithm confusion, weak secret cracking, and kid parameter injection. A proper four-step PoC demonstrating forged admin access to a privileged endpoint consistently achieves Critical severity ratings and substantial payouts.
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 share in #day-17-jwt on Discord.
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 share in #day-17-jwt on Discord.
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 share in #day-17-jwt on Discord. 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.

