Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain JWE token issued by application
-
ExploitIdentify dir mode with undersized oct key
-
ExecutionReconstruct zero-padded/all-zero AES key
-
ImpactDecrypt content and disclose token plaintext
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Encryption strength requirements
|
| Exploitation Conditions | Exploitation requires the application to be configured for direct encryption (alg=dir) with an oct key shorter than the content-encryption-key size required by the chosen enc algorithm: shorter than 256/384/512 bits for A128CBC-HS256/A192CBC-HS384/A256CBC-HS512, or shorter than 128/192/256 bits for A128GCM/A192GCM/A256GCM. With a key of half the required size or less, the AES key becomes all-zero and the content is readable by anyone holding the token; a key between half and full size leaves only the bytes past the first half protecting the content; an empty key (k='', as JWKFactory::createFromSecret() returns for an empty string) additionally lets an attacker forge acceptable tokens (and makes AES-GCM content fully unprotected). Limiting factors: this is NOT a default condition - the attacker cannot induce it and it depends entirely on operator key configuration; the attacker must also obtain an issued token. Not affected: dir keys of the required size or longer, and all other key management modes (key wrapping, encryption, and key agreement were already checked). |
| Impact | The input provides a CVSS 4.0 score of 8.2 (High) with vector AV:N/AC:L/AT:P/PR:N/UI:N and confidentiality-only impact (VC:H, VI:N, VA:N). The network vector and lack of privilege/interaction requirements (PR:N/UI:N) make token decryption trivial for anyone holding a token, but the AT:P flag (attack requirement) is the decisive signal: the advisory states explicitly that 'an attacker cannot cause the condition, which depends on the configured key.' Real-world risk therefore hinges entirely on whether an operator deployed direct (dir) encryption with an undersized oct key - a plausible mistake (e.g. JWKFactory::createOctKey(128) for A128CBC-HS256, or a short text secret) but not a default state. No EPSS score is provided in the input, so exploitation probability cannot be quantified. The vulnerability is NOT in CISA KEV and no PoC or exploit reference is supplied, so this is no public exploit identified at time of analysis. The vuln.today decision label is 'this_week' (not act_now or emergency), consistent with a high-impact-but-configuration-gated issue rather than a mass-exploitation threat. Bottom line: a genuine, high-severity cryptographic weakness where exposure is real wherever the misconfiguration exists (every token ever issued under a half-size-or-smaller key should be treated as disclosed), but it is not an internet-wide, attacker-triggerable condition. Note that VI:N understates one edge case the advisory documents: an empty key (k:'') also lets an attacker forge tokens the decrypter accepts, adding an integrity impact in that specific sub-case. |
| Exploit ScenarioDerived | An application uses web-token with alg=dir and enc=A256CBC-HS512 but is configured with a 256-bit secret (half the required 512-bit CEK), so the AES ENC_KEY is all zero bytes. An attacker who obtains any issued JWE token decrypts its contents offline under an all-zero AES key without knowing any secret; if the configured key is empty, the attacker can additionally forge tokens the decrypter will accept. No public exploit code is identified in the provided sources. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 26, 2026
Confidentiality loss in web-token/jwt-framework and the underlying jwt-library: JWE tokens produced with direct encryption ("alg":"dir") and an octet key shorter than the content-encryption key size are silently encrypted under an all-zero AES key, so anyone who obtains such a token can read its payload without any key material. The flaw affects every release since 0.5.0 (2017) and is fixed in 3.4.13, 4.0.9, 4.1.11 and 4.2.6; exploitation is unauthenticated (CVSS PR:N) but requires the operator to have configured an undersized dir key, an attacker cannot induce the condition, and the attacker must also obtain an issued token. No public exploit code or active exploitation is identified at time of analysis, but the vulnerable configuration is an easy mistake (for example JWKFactory::createOctKey(128) with A128CBC-HS256, or a 32-character secret used with A256CBC-HS512), which is why it is prioritized for patching this week.
RemediationAI
Vendor-released patch: 3.4.13, 4.0.9, 4.1.11 and 4.2.6, in which JWEBuilder refuses a dir key shorter than the CEK size with an InvalidArgumentException ("Invalid CEK size"), JWEDecrypter declines to decrypt with such a key and moves to the next key in the set, and JWELoader rejects the token; see https://github.com/web-token/jwt-framework/security/advisories/GHSA-jc6j-46g2-xwqc. Because 3.4.13 is the final release of the 3.4 line, which reaches end of life with it, upgrade to the 4.x branch. Be aware of the compatibility consequence: an application whose dir key is shorter than the CEK size can no longer build or decrypt tokens with it after upgrading, and since tokens issued under a key of half the required size or less were readable by anyone, treat their content as disclosed and replace the key. Generate dir keys of exactly 256, 384 or 512 bits for A128CBC-HS256, A192CBC-HS384 and A256CBC-HS512, and 128, 192 or 256 bits for the AES-GCM algorithms, randomly via JWKFactory::createOctKey(), and never build a dir key from a text secret or from an environment variable that may be empty. Keys longer than the CEK size continue to work only through their first bytes; they are deprecated as of 4.3.0 and refused from 5.0.0.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 3 packages in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
In JWE direct encryption, the application's symmetric oct key is used as the content encryption key instead of a key-management step deriving or wrapping one. The AES-CBC-HMAC-SHA2 algorithms defined in RFC 7518 section 5.2 split the CEK into MAC_KEY followed by ENC_KEY and require 256, 384 or 512 bits for A128CBC-HS256, A192CBC-HS384 and A256CBC-HS512 respectively. Neither JWEBuilder nor JWEDecrypter compared the supplied key length against that requirement (CWE-326, Inadequate Encryption Strength, mapped additionally to CWE-1284 for improper validation of a specified quantity). When a key sized as the algorithm name suggests (128/192/256 bits) is supplied, the whole key becomes MAC_KEY, ENC_KEY is empty, and PHP's OpenSSL extension zero-pads the short AES key, so content is encrypted under 16, 24 or 32 zero bytes; keys between half and full size leave only the bytes past the first half protecting the content. Integrity is generally preserved because MAC_KEY stays secret, except with an empty key ({"kty":"oct","k":""}, which JWKFactory::createFromSecret() returns for an empty string), which makes tokens both readable and forgeable, and which fully unprotects AES-GCM content. The AES-GCM algorithms never performed this check; the AES-CBC-HMAC algorithms did until release 0.5.0 in 2017, after which every release is affected. Not affected are dir keys of the required size or longer and all other key-management modes, since wrapped, encrypted and key-agreement-derived keys were already length-checked. The assessed impact is confidentiality-only (CVSS 4.0 8.2 with AT:P; independent CVSS 3.1 AV:N/AC:H/PR:N/UI:N/C:H/I:N/A:N).
Know when Jwt Library gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
AC:H because success depends on an attacker-uncontrollable misconfiguration (an undersized dir key); PR:N/UI:N as merely holding a token suffices; C:H for content disclosure, I:N/A:N since forgery applies only to the narrow empty-key case.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
web-token jwt-framework and jwt-library before 3.4.13, 4.0.x before 4.0.9, 4.1.x before 4.1.11, and 4.2.x before 4.2.6 (and jwt-encryption through 3.2.10) do not check the key length in JWEBuilder and JWEDecrypter for direct (dir) encryption, so undersized keys are zero-padded. Anyone holding a token issued with a half-size AES-CBC-HMAC key can decrypt it, and an empty key also allows forging tokens the decrypter accepts.
Technical POC Analysis
CWE-326 (Inadequate Encryption Strength), with a secondary CWE-1284 (Improper Validation of Specified Quantity in Input) per the advisory.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A high-severity flaw in the widely used web-token/jwt-framework and jwt-library causes certain JWE tokens to be encrypted with an all-zero key when an undersized direct-encryption key is configured, allowing anyone who obtains such a token to read its contents. Any product relying on these libraries for token-based authentication or data protection may be affected, exposing sensitive payloads across identity, API, and data-exchange flows. Leadership should prioritize remediation because the misconfiguration is easy to make and has persisted since 2017, creating a broad and long-standing exposure window.
Vendor-released patch: 3.4.13, 4.0.9, 4.1.11, 4.2.6
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
More in Jwt Library
View allNATS Server 2.x before 2.2.0 and JWT library before 2.0.1 have Incorrect Access Control because Import Token bindings ar
Unauthenticated remote attackers can exhaust server CPU in PHP applications using the web-token/jwt-framework or jwt-lib
PHP applications using web-token/jwt-framework or its jwt-library component that register the RSA1_5 key-encryption algo
CPU-exhaustion denial of service in web-token/jwt-framework and the related jwt-library, jwt-encryption and jwt-signatur
CPU exhaustion in web-token JWT Framework (jwt-framework and jwt-library) lets an unauthenticated remote attacker keep P
Unauthenticated CPU and memory exhaustion in web-token/jwt-framework and web-token/jwt-library lets anyone who can submi
JWE tokens produced with ECDH-ES (or the non-registered ECDH-SS) direct key agreement and A256CBC-HS512 in web-token/jwt
Unbounded RSA key parameters in web-token/jwt-framework and jwt-library allow a remote, unauthenticated attacker to cons
Unblinded RSA private key operations in web-token/jwt-framework and jwt-library (all versions before 3.4.13, 4.0.9, 4.1.
Parsing JSON General serialized JWS tokens in web-token/jwt-framework and the underlying jwt-library (before 3.4.13, 4.0
RSA-OAEP decryption in web-token/jwt-framework and jwt-library accepts a JWE Encrypted Key composed of several RSA block
The web-token/jwt-framework PHP library fails to validate the length of oct keys used with A128KW/A192KW/A256KW, A128GCM
EUVD-2026-136750
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB