Jwt Framework
Monthly
JWE tokens produced with ECDH-ES (or the non-registered ECDH-SS) direct key agreement and A256CBC-HS512 in web-token/jwt-framework and web-token/jwt-library are effectively encrypted under an all-zero AES-256 key, so anyone who holds such a token can read its plaintext without the recipient's private key. The root cause is ConcatKDF::generate(), which performs a single SHA-256 round and can never return more than 32 bytes, leaving ENC_KEY empty for the 64-byte CEK that A256CBC-HS512 expects (PHP's OpenSSL extension zero-pads the short key); with A192CBC-HS384 the content key drops to 64-bit strength because only 8 of the 48 required bytes remain secret. The flaw is configuration-bounded: A128CBC-HS256, the AES-GCM modes, and all ECDH-ES+A*KW key-wrapping variants request 256 bits or less and are unaffected, so only deployments that selected one of the two oversized CBC-HMAC content algorithms with direct agreement are exposed; no public exploit was identified at time of analysis, and fixed releases are available at 3.4.12, 4.0.8, 4.1.10 and 4.2.4.
PHP applications using web-token/jwt-framework or its jwt-library component that register the RSA1_5 key-encryption algorithm for JWE decryption expose a Bleichenbacher/Marvin padding oracle: adaptively crafted encrypted_key values can be distinguished by timing between padding-rejected, padding-valid-but-wrong-CEK-length, and padding-valid-with-full-AEAD paths, allowing an unauthenticated remote attacker to recover the wrapped content encryption key through a high volume of adaptive queries and statistical timing analysis. Only deployments that enable RSA1_5 while holding the RSA private key are affected; RSA-OAEP/RSA-OAEP-256-only configurations are not. Fixed releases 3.4.10, 4.0.7 and 4.1.7 implement constant-time implicit rejection, and no public exploit code was identified at the time of analysis.
Unauthenticated remote attackers can exhaust server CPU in PHP applications using the web-token/jwt-framework or jwt-library packages by submitting a JWE that uses a PBES2-HS*+A*KW key-encryption algorithm with an oversized p2c (PBKDF2 iteration count) value in its JOSE protected header. PBES2AESKW::unwrapKey() passed that attacker-controlled value straight to hash_pbkdf2() with no upper bound, so a single token requesting 100,000,000 iterations can tie up a worker for roughly 87 seconds before the key unwrap even fails. Applications are exposed only if they register a PBES2-HS*+A*KW algorithm in their decryption AlgorithmManager and process untrusted JWEs; no public exploit code or confirmed active exploitation was identified at time of analysis, and the CVSS 4.0 score of 8.7 reflects high availability impact with no confidentiality or integrity effect.
Undetected tampering of JWE tokens is possible in web-token/jwt-framework 1.2.0 before 3.4.10, 4.0.x before 4.0.7, and 4.1.x before 4.1.7 when the experimental Chacha20Poly1305 key-encryption algorithm is registered, because the Poly1305 tag is discarded during encryption and not verified during decryption. An attacker on the token path can modify the wrapped content encryption key without the tampering being detected, but the algorithm is opt-in and not enabled by default, so the risk is moderate and conditional and impact is integrity-only. No public exploit was identified at time of analysis, and the vendor advisory lists fixes in 3.4.10, 4.0.7, and 4.1.7 for the jwt-library branches.
JWE tokens produced with ECDH-ES (or the non-registered ECDH-SS) direct key agreement and A256CBC-HS512 in web-token/jwt-framework and web-token/jwt-library are effectively encrypted under an all-zero AES-256 key, so anyone who holds such a token can read its plaintext without the recipient's private key. The root cause is ConcatKDF::generate(), which performs a single SHA-256 round and can never return more than 32 bytes, leaving ENC_KEY empty for the 64-byte CEK that A256CBC-HS512 expects (PHP's OpenSSL extension zero-pads the short key); with A192CBC-HS384 the content key drops to 64-bit strength because only 8 of the 48 required bytes remain secret. The flaw is configuration-bounded: A128CBC-HS256, the AES-GCM modes, and all ECDH-ES+A*KW key-wrapping variants request 256 bits or less and are unaffected, so only deployments that selected one of the two oversized CBC-HMAC content algorithms with direct agreement are exposed; no public exploit was identified at time of analysis, and fixed releases are available at 3.4.12, 4.0.8, 4.1.10 and 4.2.4.
PHP applications using web-token/jwt-framework or its jwt-library component that register the RSA1_5 key-encryption algorithm for JWE decryption expose a Bleichenbacher/Marvin padding oracle: adaptively crafted encrypted_key values can be distinguished by timing between padding-rejected, padding-valid-but-wrong-CEK-length, and padding-valid-with-full-AEAD paths, allowing an unauthenticated remote attacker to recover the wrapped content encryption key through a high volume of adaptive queries and statistical timing analysis. Only deployments that enable RSA1_5 while holding the RSA private key are affected; RSA-OAEP/RSA-OAEP-256-only configurations are not. Fixed releases 3.4.10, 4.0.7 and 4.1.7 implement constant-time implicit rejection, and no public exploit code was identified at the time of analysis.
Unauthenticated remote attackers can exhaust server CPU in PHP applications using the web-token/jwt-framework or jwt-library packages by submitting a JWE that uses a PBES2-HS*+A*KW key-encryption algorithm with an oversized p2c (PBKDF2 iteration count) value in its JOSE protected header. PBES2AESKW::unwrapKey() passed that attacker-controlled value straight to hash_pbkdf2() with no upper bound, so a single token requesting 100,000,000 iterations can tie up a worker for roughly 87 seconds before the key unwrap even fails. Applications are exposed only if they register a PBES2-HS*+A*KW algorithm in their decryption AlgorithmManager and process untrusted JWEs; no public exploit code or confirmed active exploitation was identified at time of analysis, and the CVSS 4.0 score of 8.7 reflects high availability impact with no confidentiality or integrity effect.
Undetected tampering of JWE tokens is possible in web-token/jwt-framework 1.2.0 before 3.4.10, 4.0.x before 4.0.7, and 4.1.x before 4.1.7 when the experimental Chacha20Poly1305 key-encryption algorithm is registered, because the Poly1305 tag is discarded during encryption and not verified during decryption. An attacker on the token path can modify the wrapped content encryption key without the tampering being detected, but the algorithm is opt-in and not enabled by default, so the risk is moderate and conditional and impact is integrity-only. No public exploit was identified at time of analysis, and the vendor advisory lists fixes in 3.4.10, 4.0.7, and 4.1.7 for the jwt-library branches.