CVE-2026-137564: web-token jwt-framework before 3.4.13 Missing Key Size Check in Direct Encryption
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.
Affected Software
Event History
Frequently Asked Questions
Which deployments are exposed to token disclosure or forgery?
Deployments using direct (dir) JWE encryption with an undersized AES-CBC-HMAC key are exposed to decryption of tokens issued with a half-size key. Deployments whose decrypter accepts an empty key are exposed to token forgery.
What does an attacker need to exploit the issue?
To decrypt affected tokens, an attacker needs possession of a token issued using a half-size AES-CBC-HMAC key. Forgery is possible when the decrypter accepts an empty key; the advisory does not state any additional authentication or user-interaction requirement.
Which versions contain the fix?
The issue is fixed in jwt-framework 3.4.13, jwt-library 4.0.9, 4.1.11, and 4.2.6. The affected jwt-encryption range is through 3.2.10; no fixed jwt-encryption version is provided in the available data.