Skip to main content

cjose CVE-2026-53938

HIGH
Heap-based Buffer Overflow (CWE-122)
2026-09-09 security-advisories@github.com
8.2
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send crafted compact JWE with oversized encrypted_key segment
  2. Delivery
    Application passes token to cjose_jwe_import() (succeeds - parsing is not restricted)
  3. Exploit
    Application calls cjose_jwe_decrypt() with AES-KW alg
  4. Execution
    Missing length check allows AES_unwrap_key to write beyond fixed-size CEK heap buffer
  5. Impact
    Heap corruption triggers process crash (DoS) or memory-corruption primitive

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target application calls cjose_jwe_import() followed by cjose_jwe_decrypt() on attacker-supplied input where the JWE header specifies A128KW, A192KW, or A256KW as the alg value. No authentication is required; both functions are pre-authentication entry points that parse and process fully attacker-controlled data before any credential check occurs. The attacker must be able to deliver a crafted compact JWE to the application - any API endpoint, OAuth2 token exchange, or OpenID Connect flow that accepts JWE-formatted tokens is a candidate. Exploitation is not possible against applications that exclusively accept RSAES-OAEP, ECDH-ES, or direct (dir) key-management algorithms. Versions 0.6.2.5 and later contain the length-validation fix and are not exploitable via this path.

Impact

The CVSS 8.2 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H) accurately captures the core risk profile: the attack is network-reachable, requires no authentication, no user interaction, and no special conditions beyond the target application accepting AES-KW JWEs. The high availability impact (A:H) is well-grounded - heap corruption reliably causes a crash. The low integrity score (I:L) reflects the theoretical possibility of an attacker-controlled write primitive via heap layout manipulation, though converting this to reliable code execution requires significant post-exploitation work and is highly allocator-dependent. No EPSS data is present in the input and no CISA KEV listing exists, indicating no confirmed in-the-wild exploitation at time of analysis. The attack is fully automatable: a single crafted HTTP/API request containing a malformed JWE is sufficient to trigger the vulnerability against any unpatched endpoint, meaning SSVC automatable=YES and technical impact=total for availability. cjose is most prominently used by mod_auth_openidc and similar OIDC authentication libraries, so exposed endpoints are typically authentication or token-exchange services - high-value targets that also tend to be internet-facing, amplifying real-world risk despite the absence of a KEV listing.

Exploit ScenarioDerived

An unauthenticated attacker targeting an OIDC-enabled web application constructs a compact JWE with a valid header specifying "alg":"A128KW" and replaces the encrypted_key segment with a base64url-encoded blob decoding to 1024 bytes - far exceeding the expected 24 bytes (16-byte CEK + 8). When the application passes this token to cjose_jwe_decrypt() as part of its authentication or token-exchange flow, the library accepts the token at import time and then on decryption calls AES_unwrap_key with the oversized input, writing up to 1016 bytes beyond the heap-allocated CEK buffer. This reliably crashes the application process and, under favorable heap layouts, could be further developed into arbitrary code execution.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 09, 2026

Heap buffer overflow in OpenIDC/cjose versions prior to 0.6.2.5 allows a remote unauthenticated attacker to corrupt process heap memory by submitting a crafted JWE token with an oversized encrypted_key segment targeting the AES Key Wrap decryption path. The cjose_jwe_import() and cjose_jwe_decrypt() functions are pre-authentication entry points that accept fully attacker-controlled input, making every application that decrypts AES-KW JWEs with this library directly reachable. Impact ranges from a reliable denial of service (process crash) to potential memory-corruption-based code execution depending on heap layout and allocator behavior. No public exploit has been identified at time of analysis, but the patch commit confirms the exact boundary condition and includes a regression test demonstrating the overflow trigger.

RemediationAI

Upgrade to cjose 0.6.2.5 immediately; this release adds the length validation if (recipient->enc_key.raw_len != jwe->cek_len + 8) in _cjose_jwe_decrypt_ek_aes_kw() before calling AES_unwrap_key, preventing the overflow entirely. The fix is confirmed in commit 8c51d245273583a658f24ef7b08ba22f848a34a5 and advisory GHSA-75r7-f5cv-g3wj. If upgrading immediately is not feasible, reject any JWE whose header alg field is one of A128KW, A192KW, or A256KW at the application layer before passing the token to cjose_jwe_decrypt() - this prevents the vulnerable code path from executing entirely. This workaround requires inspecting the decoded JWE header prior to decryption and will break legitimate flows if AES-KW is the only configured key-management algorithm; in that case, consider temporarily switching to direct key agreement (dir) or ECDH-ES as an alternative key-management scheme while the upgrade is prepared. Downstream consumers of mod_auth_openidc or other cjose-dependent packages should check their bundled cjose version and apply vendor-specific updates as they become available.

Affected ProductsAI

OpenIDC/cjose versions prior to 0.6.2.5 are affected, specifically the JWE decryption path for AES Key Wrap key-management algorithms (alg = A128KW, A192KW, A256KW). No CPE string is provided in the available data; affected packages should be identified by source dependency on the cjose C library. The fix is available in cjose 0.6.2.5, documented in GitHub security advisory GHSA-75r7-f5cv-g3wj (https://github.com/OpenIDC/cjose/security/advisories/GHSA-75r7-f5cv-g3wj) and applied in commit 8c51d245273583a658f24ef7b08ba22f848a34a5 (https://github.com/OpenIDC/cjose/commit/8c51d245273583a658f24ef7b08ba22f848a34a5). Downstream packages that bundle or link cjose (notably mod_auth_openidc) should be assessed for their bundled cjose version independently.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

cjose is a C library implementing the JOSE suite (RFC 7515-7519) including JWE (RFC 7516) encryption and decryption. The AES Key Wrap algorithm (RFC 3394) specifies that a wrapped key is always exactly plaintext_length + 8 bytes; the unwrapping step copies the ciphertext into a heap-allocated Content Encryption Key (CEK) buffer sized for the expected CEK only. In src/jwe.c, the function _cjose_jwe_decrypt_ek_aes_kw() called AES_unwrap_key without first validating that recipient->enc_key.raw_len == jwe->cek_len + 8. An attacker who provides a compact JWE whose second segment (the encrypted_key) decodes to more bytes than cek_len + 8 causes AES_unwrap_key to write beyond the end of the fixed-size CEK buffer - a textbook CWE-122 heap-based buffer overflow. The patch (commit 8c51d245) adds the single missing length check before the unwrap call, rejecting malformed tokens with CJOSE_ERR_INVALID_ARG. All three symmetric key-wrap variants (A128KW with 16-byte CEK, A192KW with 24-byte CEK, A256KW with 32-byte CEK) share this code path and are equally affected.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (github) PRIMARY 8.2 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
vuln.today AI 8.2 HIGH

Pre-authentication network entry point (AV:N/PR:N); I:L reflects theoretical heap-write primitive; A:H for reliable crash on heap overflow.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N
SUSE HIGH
Red Hat 8.2 HIGH

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
High

DescriptionCVE.org

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.

Technical POC Analysis

The flaw is a heap-based out-of-bounds write (CWE-122 / CWE-787) in the JWE decryption path for AES Key Wrap key management.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

OpenIDC's cjose library (versions prior to 0.6.2.5) contains a heap buffer overflow in the JWE decryption path that allows remote, unauthenticated attackers to crash applications or potentially execute code. Any service using cjose for OAuth/OpenID Connect token validation is vulnerable to remote disruption or compromise. Without a vendor patch currently available, organizations must rapidly identify and monitor affected systems.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations include: restricting JWE token processing to known, trusted identity providers; implementing strict input validation to reject abnormally large tokens before decryption; deploying application-level monitoring to detect crashes or memory corruption patterns during token processing; and disabling AES Key Wrap encryption algorithm if alternative algorithms (such as RSA-OAEP or direct key agreement) are acceptable within your authentication architecture.

Threat Intelligence Overview

EPSS Score
0.2%
Top 85% exploitable
Prevalence
Medium
C JOSE library used primarily in enterprise OIDC/SSO stacks
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS Vulnrichment Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

41
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Module for Server Applications 15 SP7 Affected
SUSE Linux Enterprise Server 15 SP7 Affected
SUSE Linux Enterprise Server 16.0 Affected
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP Applications 15 SP7 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy