Junglewise Threat Intelligence

CVE-2026-53938: OpenIDC cjose heap buffer overflow in AES Key Wrap decryption

CVE-2026-53938 · Severity: high · CVSS 8.2 · Published 2026-09-09

Vendors: Openidc.

Executive brief

cjose is a cryptography library used to process and decrypt digitally signed and encrypted tokens (JWEs) commonly used for authentication and secure data exchange. A vulnerability in the AES Key Wrap decryption feature allows an unauthenticated attacker to send a malformed token that triggers a heap memory corruption, causing the application to crash or potentially allowing further compromise of the system.

Technical details

The vulnerability is a heap buffer overflow in cjose's JWE decryption path for AES Key Wrap algorithms (A128KW, A192KW, A256KW). The root cause is insufficient validation of the attacker-supplied encrypted_key (JWE Encrypted Key) length before unwrapping it into a fixed-size Content Encryption Key (CEK) buffer. When AES_unwrap_key() is called, it writes raw_len - 8 bytes into a buffer sized for cek_len bytes, causing an out-of-bounds heap write when raw_len > cek_len + 8. The vulnerability is reachable pre-authentication via cjose_jwe_import() and cjose_jwe_decrypt(), which parse fully attacker-controlled JWE input. A remote unauthenticated attacker can exploit this with a crafted JWE to trigger denial of service (crash) or potential heap corruption leading to further memory exploitation depending on allocator state. The fix adds a length check to ensure raw_len == cek_len + 8 before calling AES_unwrap_key(). Patched in version 0.6.2.5.

Affected products

  • OpenIDC cjose <= 0.6.2.4

Timeline

  • 2026-09-09: disclosed
  • 2026-06-02: patched: Version 0.6.2.5 released with fix

References

Related threats