Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/george0papasotiriou/cve-2026-21003-jwt-none-algorithm-bypass-via-kid-header-omission
Authentication & AuthorizationVulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingAPI SecurityAdversarial Attack
GitHubgeorge0papasotiriou/cve-2026-21003-jwt-none-algorithm-bypass-via-kid-header-omission

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-21003-JWT-none-Algorithm-Bypass-via-kid-Header-Omission

Proof-of-concept exploit for CVE-2026-21003 demonstrating JWT authentication bypass by omitting the kid header and using the 'none' algorithm to impersonate users.

View Repository
21 month agoNot yet reviewed

CVE-2026-21003 – JWT "none" Algorithm Bypass via kid Header Omission

Program Code (Node.js)

root@kitploit:~
// jwt_verify_server.js - Vulnerable JWT verification
const jwt = require('jsonwebtoken');
const express = require('express');
const app = express();
app.use(express.json());

const publicKey = `-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu1SU1LfVLPHCYZM5rPY4...
-----END PUBLIC KEY-----`;

app.post('/verify', (req, res) => {
    const token = req.body.token;
    // Vulnerability: if no algorithm specified, defaults to HS256? Actually, jsonwebtoken can be tricked.
    // We simulate a custom verifier that accepts "none" if kid is missing.
    const decoded = jwt.decode(token, { complete: true });
    if (!decoded.header.alg || decoded.header.alg === 'none') {
        // Accept token without signature
        res.json({ status: 'authenticated', user: decoded.payload.sub });
    } else {
        jwt.verify(token, publicKey, { algorithms: ['RS256'] }, (err, payload) => {
            if (err) res.status(401).send('Invalid');
            else res.json({ status: 'authenticated', user: payload.sub });
        });
    }
});
app.listen(3000);

CVE-2026-21003 – JWT "none" Algorithm Bypass via kid Omission

Severity: Critical

Overview

A custom JWT verifier does not properly enforce that a signing algorithm is present. If the token’s header omits the alg parameter or explicitly sets it to none, the server accepts the token without verifying a signature, allowing privilege escalation.

Vulnerability Details

  • Type: Authentication Bypass
  • Impact: Impersonation of any user.
  • Root Cause: The code path for missing algorithm defaults to skipping signature verification.

Exploit Demonstration

  1. Start the server:
    root@kitploit:~
    npm install express jsonwebtoken
    node jwt_verify_server.js
    
  2. Run the exploit:
    root@kitploit:~
    pip install pyjwt requests
    python exploit_jwt_none.py
    

Response shows authenticated as admin.

Download Tool