REDHAT-BUG-2530243: Openidc cjose vulnerability

Published Sep 8, 2026
·
Updated

OpenIDC/cjose is a C library implementing the Javascript Object Signing and Encryption (JOSE). In versions 0.6.1 through 0.6.2.5, when cjose encrypts a JWE 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 all zero bytes instead of being randomly generated. The resulting JWE is therefore encrypted and authenticated under a fixed, publicly known key, so anyone who obtains the JWE can recover the plaintext and forge or modify the content. This is fixed in version 0.6.2.6 by cjosejwesetcekaescbc() generating the CEK from RANDbytes. A regression test asserts that the encryptedkey differs across two encryptions for each AES-CBC-HMAC variant. Until upgrading, for data encrypted with cjose, three options are available. Use an AES-GCM enc (A128GCM / A192GCM / A256GCM) instead of an AES-CBC-HMAC enc, use alg=dir with a caller-supplied CEK, or avoid using cjose for JWE encryption with the affected algorithm pair. These are mitigations for new ciphertexts only; data already encrypted under the zero key remains compromised and should be re-encrypted (and any secrets it contained rotated).

Affected Software

1 affected component
openidc cjose>=0.6.1<=0.6.2.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade OpenIDC/cjose to a version that resolves this vulnerability.

    Fixed in 0.6.2.6
  2. Configuration

    Use an AES-GCM content-encryption algorithm instead of A128CBC-HS256, A192CBC-HS384, or A256CBC-HS512 for new ciphertexts.

    cjose JWE enc = A128GCM, A192GCM, or A256GCM
  3. Configuration

    Until upgrading, use alg=dir with a caller-supplied content-encryption key for new ciphertexts.

    cjose JWE alg = dir with caller-supplied CEK
  4. Compensating control

    Until upgrading, avoid using cjose for JWE encryption with the affected AES-CBC-HMAC algorithm pairs.

  5. Operational

    Re-encrypt data already encrypted under the zero key and rotate any secrets contained in that data.

Event History

Sep 8, 2026
Data Sourced
via Red Hat·11:41 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Which JWE encryptions are affected?

JWE encryption is affected in cjose versions 0.6.1 through 0.6.2.5 when using A128CBC-HS256, A192CBC-HS384, or A256CBC-HS512 with a key-management algorithm that generates a fresh CEK. The issue does not describe the same condition for AES-GCM encryption or for alg=dir with a caller-supplied CEK.

2

What can an attacker do with an affected JWE?

Anyone who obtains an affected JWE can recover its plaintext. They can also forge or modify its content because encryption and authentication use a fixed, publicly known all-zero CEK.

3

How can teams mitigate the issue before upgrading?

For new ciphertexts, use an AES-GCM enc value such as A128GCM, A192GCM, or A256GCM; use alg=dir with a caller-supplied CEK; or avoid cjose JWE encryption for the affected algorithm combinations. These mitigations apply only to newly created ciphertexts.

4

What should be done about existing ciphertexts?

Ciphertexts created under the affected conditions were encrypted and authenticated with the zero key, so obtaining the JWE is sufficient to expose or alter its content. Upgrading to version 0.6.2.6 fixes CEK generation for subsequent affected AES-CBC-HMAC encryptions, but does not change previously produced JWE objects.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203