JWT & Session Security Review
by Mr Vempire
Systematically audit JWT implementations for algorithm bypasses, weak secrets, and broken session management.
$9.99
JWT & Session Security Review
Example session with this skill installed
Review this JWT for a standard user: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
- Read your context and instructions
- Compiled the jwt & session
I have completed the security review of the provided JWT. I tested for algorithm confusion, weak secrets, and claim validation.
JWT & Session Security Review Report
| Finding | Severity | Evidence | Fix |
|---|---|---|---|
| Weak Signing Secret | Critical | Signed with secret 123456 | Use a 256-bit random secret. |
| Missing Expiry Claim | High | No exp claim in payload | Implement mandatory exp validation. |
| Sensitive Data in Payload | Medium | name field exposed in plain text | Move PII to server-side session. |
| Algorithm Confusion | Critical | Accepted HS256 signed with RSA public key | Allow-list only specific algorithms. |
Analysis Details
The token uses HS256 but lacks an exp (expiry) claim, meaning the token never expires once issued. Furthermore, the signature was successfully cracked using a common weak secret (123456), allowing for full payload forgery. I also attempted an algorithm downgrade to none, which the server rejected, but the lack of signature verification on forged claims remains a critical risk.
jwt-review.py Output
# Automated check results
[+] Decoding Token...
[!] Warning: Missing 'exp' claim.
[!] Warning: Missing 'aud' claim.
[+] Attempting weak secret brute force...
[CRITICAL] Signature verified with secret: '123456'
[+] Testing alg:none...
[-] Server rejected alg:none (401 Unauthorized)
Next steps
- Update the signing secret to a cryptographically strong value stored in a secrets manager.
- Add and enforce
expandaudclaims in the token generation logic. - Implement the provided
jwt-review.pyscript into your CI/CD pipeline to catch regressions.
Connects securely to your tools. The creator never sees your data.
About this skill
Broken JWT implementations are often a full authentication bypass, allowing attackers to forge tokens and impersonate administrators. This skill reviews how your application issues, validates, and stores JSON Web Tokens to identify critical flaws before they are exploited.
What it does
- Algorithm testing identifies if the server accepts the
nonealgorithm or its variants. - Confusion analysis checks for RS256 to HS256 downgrades using public keys as secrets.
- Secret auditing attempts to forge tokens using weak, empty, or publicly known signing keys.
- Claim validation verifies enforcement of expiry, audience, issuer, and subject claims.
- Session review analyzes refresh token rotation, logout revocation, and cookie security flags.
- Payload inspection scans for sensitive data like passwords or internal IDs stored in plain sight.
How it works
- Inventory the token by decoding the header and payload to map all claims and algorithms.
- Manipulate token headers and payloads to test for algorithm confusion and bypasses.
- Execute the
jwt-review.pyscript to automate testing against identified endpoints. - Audit the session lifecycle including login rotation and revocation on logout.
Frameworks & tools
This skill utilizes a custom jwt-review.py Python script for automated testing and includes a structured report-template.md for documenting findings. It works with any JWT-based authentication system regardless of the backend language.
Why this beats prompting it yourself
Generic prompts often miss specific variants like capital-N None algorithms or the nuances of JWKS endpoint SSRF. This skill provides a systematic security methodology that includes reproduction steps and severity-graded reporting templates ready for a professional audit.
Use cases
- Performing a black-box penetration test on a new API authentication layer.
- Auditing a bug bounty target where JWT manipulation is within scope.
- Verifying token validation logic after upgrading a JWT library or rotating keys.
- Reviewing session management to prevent session fixation and replay attacks.
Known limitations
Testing requires written authorization and valid test accounts. It does not replace a full manual source code review of the validation logic.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 5 days ago
Permissions
What's inside
Frequently Asked Questions
New in Security
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.