# JWT None Algorithm > Acceptance of an unsecured JWS (`"alg":"none"`, empty signature) or of any token whose signature check is skipped, so claims are trusted without cryptographic verification. ## How it works RFC 7518 defines `none` for Unsecured JWS: the signature MUST be the empty octet sequence, and implementations MUST NOT accept Unsecured JWSs by default. RFC 7519 even listed `none` (alongside HS256) as mandatory to implement. The failure is that a prose rule is not a default: a library that reads `alg` from the token and dispatches on it has already let the attacker pick "no verification". An unsecured token still keeps the trailing dot: `<header>.<payload>.` The same outcome (claims accepted without a valid signature) has several distinct root causes, and testing should treat them as one family: | Root cause | Shape | |---|---| | Library honours `none` | Header-driven dispatch; CVE-2015-9235 (node-jsonwebtoken < 4.2.2) | | Case/encoding variants slip a string filter | `None`, `NONE`, `nOnE`; filters that compare literally | | Unknown `alg` returns empty signature | HarbourJwt CVE-2026-23993: any value outside HS256/384/512 makes `GetSignature()` return `""`, which equals an empty token signature | | Zero-length signature with real `alg` | Null signature, CVE-2020-28042: `alg` stays HS256, signature segment empty, library skips the compare | | `decode()` used instead of `verify()` | jsonwebtoken `decode()` parses without verifying; app trusts the output | | Plain JWT inside JWE | pac4j-jwt CVE-2026-29000: decrypted inner token parsed as `SignedJWT`; a `PlainJWT` yields null and the verify branch is skipped | | No verification at all | Server trusts unverified claims (Newspack, XBEN-027) | | App-supplied allow-list includes `none` | Parse Server CVE-2026-27804 passed header `alg` into `algorithms` | ## Notable cases - **CIRCUTOR PowerStudio SCADA WAVE (CVE-2026-120387, CVSS 4.0 10.0)**: the shared JWT validation component accepts `alg=none`; unauthenticated identity forgery, chained to RCE in the original research. Affected 24.8.0 to < 24.11.17.0; CISA ADP marks it automatable, PoC public. - **Cudy TR3000 / AX3000 (CVE-2026-75491)**: `auth_plugin_jwt.so` on the MQTT broker (8883) accepted `alg none` combined with a trusted client certificate, authenticating as `admincudydevice` and reaching root `batchcmd` execution. Fixed in firmware 2.5.42. - **pac4j-jwt (CVE-2026-29000, max severity)**: with RSA JWE plus both `EncryptionConfiguration` and `SignatureConfiguration`, an attacker who has only the server's RSA public key encrypts an unsigned inner JWT and `JwtAuthenticator` builds a profile from unverified claims. Fixed 4.5.9 / 5.7.9 / 6.3.3. Encryption to a public key provides no authenticity; the inner signature is the only integrity control. - **HarbourJwt (CVE-2026-23993)**: found by LLM-assisted triage of jwt.io-listed libraries, then manual review; any unknown `alg` plus empty signature passes. - **Newspack Extended Access (H1 #2472798)**: registration/login endpoint never validated the JWT signature; an unsigned token with a victim's `email` claim authenticated as that user. - **jsonwebtoken 0.4.0**: CTF reproduction of the early Node library honouring `none` for user-to-admin escalation. - **Intigriti November CTF**: `none` gave admin, which exposed an SSTI sink and RCE; typical of how unsigned-token acceptance is a first link rather than the end. - **Practitioner checklist (robinx0)**: `none` accepted by older jsonwebtoken, python-jwt and several Go libraries; modern libraries reopen it with one line (`options={'verify_signature': False}`). A different error for a tampered signature than for a tampered `alg` reveals a logic split worth probing ([[raw/robinx0.github.io/jwt-algorithm-confusion-none-hs256-rs256-mix-ups-and-kid-injection-15974|robinx0]]). ## Detection and testing - Baseline: replay the token, then remove it, then truncate the signature. If a truncated signature is still accepted, signature checking is absent and payload tampering is enough (jwt_tool "Is it checked?"). - Then try, separately: `alg` = `none` and case variants with an empty signature; the original `alg` with an empty signature segment; an unrecognised `alg` value with an empty signature. - For JWE deployments, check whether the decrypted inner token must be a JWS and whether the verifier fails closed when it is not. - Code review: grep for `decode(` used for authentication, `verify=False` / `options={"verify_signature": False}`, `algorithms` built from the header, and verify functions whose unsupported-algorithm path returns an empty value instead of an error. - Tooling: jwt_tool playbook mode, Burp JWT Editor ("none" attack), JWT Scanner, jwt-hack, jwt-auditor. ## Defenses - Pass an explicit asymmetric or HMAC allow-list from configuration; never include `none`, never derive it from the token (RFC 8725 §3.1). - Unknown/unsupported algorithm must raise, not return an empty signature; compare signatures in constant time and reject zero-length signatures. - Use the library's verify API, not decode, for any token that drives authentication; keep decode for logging only. - For nested JWE, require a signed inner JWT and verify it with a pinned key. - Add regression tests for `none`, unknown alg, and empty signature to the auth suite. ## Related - [[JSON Web Tokens]] - [[JWT Algorithm Confusion]] - [[JWT Empty Key Forgery]] - [[JWT Header Injection]] - [[Python JWT Library Vulnerabilities]] ## Sources - [[raw/blog.browserstay.com/the-jwt-algorithm-that-verified-nothing-alg-none-14010|The JWT algorithm that verified nothing (alg:none)]] - [[raw/portswigger.net/portswigger-kb-jwt-none-algorithm-supported-3826|PortSwigger KB: JWT none algorithm supported]] - [[raw/portswigger.net/jwt-attacks-web-security-academy-3850|JWT attacks (PortSwigger Web Security Academy)]] - [[raw/github.com/known-exploits-and-attacks-jwt-tool-wiki-4560|Known Exploits and Attacks (jwt_tool Wiki)]] - [[raw/github.com/jwt-tool-attack-methodology-wiki-3843|jwt_tool Attack Methodology wiki]] - [[raw/pentesterlab.com/cve-2026-23993-jwt-authentication-bypass-in-harbourjwt-via-unknown-alg-4968|CVE-2026-23993: JWT Authentication Bypass in HarbourJwt via Unknown alg]] - [[raw/critical.is/cve-2026-120387-powerstudio-scada-jwt-signature-validation-bypass-15145|CVE-2026-120387: PowerStudio SCADA JWT signature validation bypass]] - [[raw/0day-rubbish.com/circutor-powerstudio-jwt-alg-none-identity-forgery-15143|CIRCUTOR PowerStudio: JWT alg=none identity forgery]] - [[raw/cudy.com/cudy-mqtt-jwt-auth-bypass-alg-none-to-root-command-execution-15368|Cudy MQTT JWT auth bypass (alg none) to root command execution]] - [[raw/arcticwolf.com/cve-2026-29000-authentication-bypass-in-pac4j-jwt-4365|CVE-2026-29000: Authentication Bypass in pac4j-jwt]] - [[raw/github.com/proof-of-concept-for-cve-2026-29000-pac4j-jwt-4967|Proof of Concept for CVE-2026-29000 (pac4j-jwt)]] - [[raw/hackerone.com/hackerone-2472798-newspack-extended-access-jwt-bypass-4554|HackerOne #2472798: Newspack Extended Access JWT bypass]] - [[raw/github.com/ctf-jwt-token-vulnerability-in-early-jwt-node-js-library-github-4566|ctf-jwt-token: Vulnerability in early JWT node.js library]] - [[raw/intigriti.com/november-ctf-challenge-exploiting-jwt-vulnerabilities-to-achieve-rce-4116|November CTF Challenge: Exploiting JWT vulnerabilities to achieve RCE]] - [[raw/b52security.com/a-jwt-the-server-never-verified-xben-027-14008|A JWT the server never verified (XBEN-027)]] - [[raw/dev.to/jwt-algorithm-confusion-attacks-cve-2026-22817-fix-guide-4366|JWT Algorithm Confusion Attacks: CVE-2026-22817 Fix Guide]] - [[raw/robinx0.github.io/jwt-algorithm-confusion-none-hs256-rs256-mix-ups-and-kid-injection-15974|JWT algorithm confusion: none, HS256/RS256 mix-ups, and kid injection]]