CVE-2026-53939
cjose: OpenIDC/cjose uses all-zero Content Encryption Key for AES-CBC-HMAC JWE encryption
Severity
CriticalRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · September 9, 2026
Updated · October 30, 2026
Description
A flaw was found in cjose. When encrypting a JSON Web Encryption (JWE) object using AES-CBC-HMAC algorithms, the library initializes the encryption key with all-zero bytes instead of generating a secure random key. As a result, an attacker who intercepts the encrypted message can decrypt sensitive plaintext and alter or forge content, leading to information disclosure and loss of data integrity.
Statement
A CRITICAL severity vulnerability was found in cjose, a C library implementing the Javascript Object Signing and Encryption (JOSE) standards. The cjose package is affected in Red Hat Enterprise Linux 10, Red Hat In-Vehicle OS 2, and Fedora as shipped by Red Hat. When cjose encrypts a JSON Web Encryption (JWE) object using an AES-CBC-HMAC content-encryption algorithm (A128CBC-HS256, A192CBC-HS384, or A256CBC-HS512) together with any key-management algorithm that generates a fresh content-encryption key (CEK), the CEK is initialized to all zero bytes instead of being securely randomly generated. The resulting JWE is therefore encrypted and authenticated under a fixed, publicly known key. An attacker who obtains the encrypted JWE can decrypt it to recover sensitive plaintext and can alter or forge the encrypted content, causing information disclosure and loss of data integrity; availability is not affected. Red Hat and upstream both rate this flaw CRITICAL with a CVSS 3.1 score of 9.1 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N), so there is no difference from the upstream severity. Fixes for the affected Red Hat product streams are being pursued through delegated resolution.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Until the fixed package is installed, applications using cjose for JWE encryption can avoid the vulnerable code path by switching the content-encryption algorithm from AES-CBC-HMAC (A128CBC-HS256, A192CBC-HS384, A256CBC-HS512) to an AES-GCM enc (A128GCM, A192GCM, or A256GCM), by using alg=dir with a caller-supplied content-encryption key, or by not using cjose for JWE encryption with the affected algorithm pair. These options protect newly created ciphertexts only; data already encrypted under the all-zero key must be considered compromised, should be re-encrypted, and any secrets it contained should be rotated. Upgrading to a version containing the upstream fix (0.6.2.6 or later) resolves the issue.
CVSS / CWE
CVSS 3.1 · 9.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
CWE-331 · Insufficient Entropy