ZeroHour

CVE-2026-53938

niche

Heap out-of-bounds write in OpenIDC cjose JWE AES Key Wrap decryption (pre-auth DoS)

CVSS 3.1
8.2 high
EPSS
<1%p15
Published
()
Modified
AI analysis

cjose, a C library for Javascript Object Signing and Encryption (JOSE), fails to validate the length of the attacker-supplied JWE Encrypted Key before unwrapping it with the AES Key Wrap algorithms (A128KW/A192KW/A256KW), writing into a fixed-size heap buffer for the Content Encryption Key. A remote, unauthenticated attacker can trigger this by submitting a crafted JWE to any application that processes it via cjose_jwe_import() and cjose_jwe_decrypt() using an AES Key Wrap symmetric key. The resulting out-of-bounds heap write corrupts the heap and, at minimum, crashes the process (denial of service, reflected in the high availability component of the 8.2 CVSS score); further memory-corruption impact may be possible depending on heap layout and allocator, with limited integrity and no confidentiality impact per the vector. Any application that embeds cjose and decrypts attacker-controlled JWEs with an AES-KW key is affected. No public proof-of-concept is known, the flaw is not in CISA's KEV, and its EPSS of 0.2% (15th percentile) indicates exploitation has not yet been observed.

What to do: Upgrade cjose to 0.6.2.5, which patches the missing length validation. If upgrading is not immediately possible, reject the AES Key Wrap algorithms (A128KW/A192KW/A256KW) for untrusted JWEs at the application layer. Audit which applications and services in your estate link against cjose and decrypt attacker-controlled JWEs, prioritizing any that expose decryption pre-authentication.

Affected
OpenIDC cjose (C JOSE library)all versions prior to 0.6.2.5
Estimated exposure
nicheunknown; likely no more than tens of thousands of deployments worldwide (no public telemetry exists) — cjose is a niche C library with no published install or scan counts; it is embedded in a limited set of C-based OpenID Connect/JOSE server components, and only deployments that decrypt attacker-supplied JWEs with an AES Key Wrap key are…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

OpenIDC/cjose is a C library implementing the Javascript Object Signing and Encryption (JOSE). Prior to version 0.6.2.5, cjose's JWE decryption path for the AES Key Wrap key-management algorithms (`alg` = `A128KW`, `A192KW`, `A256KW`) does not validate the length of the attacker-supplied `encrypted_key` (JWE Encrypted Key) before unwrapping it into a fixed-size, heap-allocated Content Encryption Key (CEK) buffer. A remote, unauthenticated attacker who can submit a crafted JWE to an application that decrypts it with an AES-KW symmetric key can trigger an out-of-bounds heap write, corrupting the heap. This leads at minimum to a crash (denial of service) and, depending on the heap layout and allocator, may be leverageable for further memory-corruption impact. `cjose_jwe_import()` / `cjose_jwe_decrypt()` are pre-authentication entry points: they parse and process fully attacker-controlled input. Upgrade to cjose 0.6.2.5 to receive a patch. If upgrading is not immediately possible, reject the AES Key Wrap algorithms (`A128KW`/`A192KW`/`A256KW`) for untrusted JWEs at the application layer.

Weakness
CWE-122, CWE-787
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H

In the news

No ingested article mentions this CVE yet.