JWT & Session Security Review

    by Mr Vempire

    1

    Systematically audit JWT implementations for algorithm bypasses, weak secrets, and broken session management.

    $9.99

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    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

    FindingSeverityEvidenceFix
    Weak Signing SecretCriticalSigned with secret 123456Use a 256-bit random secret.
    Missing Expiry ClaimHighNo exp claim in payloadImplement mandatory exp validation.
    Sensitive Data in PayloadMediumname field exposed in plain textMove PII to server-side session.
    Algorithm ConfusionCriticalAccepted HS256 signed with RSA public keyAllow-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

    1. Update the signing secret to a cryptographically strong value stored in a secrets manager.
    2. Add and enforce exp and aud claims in the token generation logic.
    3. Implement the provided jwt-review.py script 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 none algorithm 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

    1. Inventory the token by decoding the header and payload to map all claims and algorithms.
    2. Manipulate token headers and payloads to test for algorithm confusion and bypasses.
    3. Execute the jwt-review.py script to automate testing against identified endpoints.
    4. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Listed5 days ago

    What's inside

    Creator

    Mr Vempire

    Mr Vempire

    32 skills on Agensi

    Frequently Asked Questions

    This skill protects against authentication bypasses by testing for algorithm confusion (like RS256 to HS256 downgrades), the 'none' algorithm flaw, weak signing secrets, and improper claim validation that could lead to account takeover.

    You receive the core `jwt-review.py` automation script, a structured `report-template.md` for professional documentation, and a comprehensive methodology guide for conducting the audit.

    No, this skill is language-agnostic; it audits the JWT structure and server responses, making it effective for APIs built on Node.js, Python, Go, Java, or any other backend framework.

    Setup is minimal: ensure your environment has Python installed and provide the agent with the target API endpoint and a sample token for initial analysis.

    Updates are released periodically to include new JWT attack vectors and bypass techniques as they are discovered in the security community, ensuring your audits remain current.

    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.