testing-for-json-web-token-vulnerabilities

Featured

Test JWT implementations for critical vulnerabilities including algorithm confusion, none algorithm bypass, kid parameter injection, and weak secret exploitation to achieve authentication bypass and privilege escalation.

Testing & QA 12,642 stars 1468 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Testing for JSON Web Token Vulnerabilities ## When to Use - When testing applications using JWT for authentication and session management - During API security assessments where JWTs are used for authorization - When evaluating OAuth 2.0 or OpenID Connect implementations using JWT - During penetration testing of single sign-on (SSO) systems - When auditing JWT library configurations for known vulnerabilities ## Prerequisites - jwt_tool (Python JWT exploitation toolkit) - Burp Suite with JWT Editor extension - jwt.io for decoding and inspecting JWT structure - Understanding of JWT structure (header.payload.signature) and algorithms (HS256, RS256) - hashcat or john for brute-forcing weak JWT secrets - Python PyJWT library for custom JWT forging scripts - Access to application using JWT-based authentication > **Legal Notice:** This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws. ## Workflow ### Step 1 — Decode and Analyze JWT Structure ```bash # Install jwt_tool pip install pyjwt git clone https://github.com/ticarpi/jwt_tool.git # Decode JWT without verification python3 jwt_tool.py <JWT_TOKEN> # Decode manually with base64 echo "<header_base64>" | base64 -d echo "<payload_base64>" | base64 -d # Examine JWT in jwt.io # Check: algorithm (alg), key ID (kid), issuer (iss), audience (aud) # Check: expiration (exp), not-b...

Details

Author
mukul975
Repository
mukul975/Anthropic-Cybersecurity-Skills
Created
3 months ago
Last Updated
today
Language
Python
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Testing & QA Featured

testing-jwt-token-security

Assessing JSON Web Token implementations for cryptographic weaknesses, algorithm confusion attacks, and authorization bypass vulnerabilities during security engagements.

12,642 Updated today
mukul975
AI & Automation Featured

exploiting-jwt-algorithm-confusion-attack

Exploits JWT algorithm confusion vulnerabilities where the server's token verification library accepts the algorithm specified in the JWT header rather than enforcing a fixed algorithm. The tester manipulates the alg header to switch from RS256 to HS256 (using the RSA public key as the HMAC secret), sets alg to none to bypass signature verification, or exploits kid/jku/x5u header injection to supply attacker-controlled keys. Activates for requests involving JWT algorithm confusion, alg none attack, key confusion attack, or JWT signature bypass.

12,642 Updated today
mukul975
AI & Automation Listed

exploiting-jwt-algorithm-confusion-attack

Exploits JWT algorithm confusion vulnerabilities where the server's token verification library accepts the algorithm specified in the JWT header rather than enforcing a fixed algorithm. The tester manipulates the alg header to switch from RS256 to HS256 (using the RSA public key as the HMAC secret), sets alg to none to bypass signature verification, or exploits kid/jku/x5u header injection to supply attacker-controlled keys. Activates for requests involving JWT algorithm confusion, alg none attack, key confusion attack, or JWT signature bypass.

6 Updated today
26zl
AI & Automation Listed

jwt-attacks

Detect JWT implementation vulnerabilities including algorithm confusion, none algorithm acceptance, weak secrets, and JWK injection attacks.

0 Updated today
Liaabnormal676
Data & Documents Listed

sast-jwt

Detect insecure JWT (JSON Web Token) implementations in a codebase using a two-phase approach: first map all JWT issuance and verification sites to understand the token lifecycle and signing configuration, then check each verification site for exploitable weaknesses such as algorithm confusion, missing signature verification, weak secrets, header injection, and missing claim validation. Requires sast/architecture.md (run sast-analysis first). Outputs findings to sast/jwt-results.md. If no JWT usage is found in Phase 1, Phase 2 is skipped. Use when asked to find JWT, token forgery, or authentication bypass bugs.

0 Updated today
reasonless-throne486