Skip to main content

CVE-2026-34986

| EUVDEUVD-2026-19363 HIGH
Uncaught Exception (CWE-248)
2026-04-03 https://github.com/go-jose/go-jose GHSA-78h2-9frx-2jm8
7.5
CVSS 3.1 · Vendor: https://github.com/go-jose/go-jose
Share

Severity by source

Vendor (https://github.com/go-jose/go-jose) PRIMARY
7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
SUSE
HIGH
qualitative
Red Hat
7.5 HIGH
qualitative

Primary rating from Vendor (https://github.com/go-jose/go-jose).

CVSS VectorVendor: https://github.com/go-jose/go-jose

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

4
Patch released
Apr 03, 2026 - 08:30 nvd
Patch available
EUVD ID Assigned
Apr 03, 2026 - 03:30 euvd
EUVD-2026-19363
Analysis Generated
Apr 03, 2026 - 03:30 vuln.today
CVE Published
Apr 03, 2026 - 03:28 nvd
HIGH 7.5

DescriptionCVE.org

Impact

Decrypting a JSON Web Encryption (JWE) object will panic if the alg field indicates a key wrapping algorithm (one ending in KW, with the exception of A128GCMKW, A192GCMKW, and A256GCMKW) and the encrypted_key field is empty. The panic happens when cipher.KeyUnwrap() in key_wrap.go attempts to allocate a slice with a zero or negative length based on the length of the encrypted_key.

This code path is reachable from ParseEncrypted() / ParseEncryptedJSON() / ParseEncryptedCompact() followed by Decrypt() on the resulting object. Note that the parse functions take a list of accepted key algorithms. If the accepted key algorithms do not include any key wrapping algorithms, parsing will fail and the application will be unaffected.

This panic is also reachable by calling cipher.KeyUnwrap() directly with any ciphertext parameter less than 16 bytes long, but calling this function directly is less common.

Panics can lead to denial of service.

Fixed In

4.1.4 and v3.0.5

Workarounds

If the list of keyAlgorithms passed to ParseEncrypted() / ParseEncryptedJSON() / ParseEncryptedCompact() does not include key wrapping algorithms (those ending in KW), your application is unaffected.

If your application uses key wrapping, you can prevalidate to the JWE objects to ensure the encrypted_key field is nonempty. If your application accepts JWE Compact Serialization, apply that validation to the corresponding field of that serialization (the data between the first and second .).

Thanks

Go JOSE thanks Datadog's Security team for finding this issue.

AnalysisAI

Denial of service via panic in go-jose library (versions prior to v4.1.4 and v3.0.5) occurs when decrypting malformed JSON Web Encryption (JWE) objects that specify a key wrapping algorithm (e.g., RSA-OAEP-KW, ECDH-ES+A128KW) but contain an empty encrypted_key field. The panic is triggered during slice allocation in cipher.KeyUnwrap() when processing ciphertext under 16 bytes, causing immediate application termination. No public exploit identified at time of analysis, though EPSS score of 0.0004

Technical ContextAI

The go-jose library provides JSON Object Signing and Encryption (JOSE) functionality for Go applications, implementing RFC 7516 for JWE. The vulnerability exists in the key unwrapping logic (key_wrap.go) used for encrypted key transport in JWE objects. Key wrapping algorithms (identified by the KW suffix in the alg header parameter) encrypt the Content Encryption Key (CEK) before including it in the encrypted_key field. The affected code path performs arithmetic on the encrypted_key length to determine slice allocation size without validating minimum length requirements. When encrypted_key is empty (zero bytes), the calculation yields zero or negative values, causing Go's runtime panic. This affects multiple go-jose package versions across v3 and v4 branches (pkg:go/github.com/go-jose/go-jose/v4, pkg:go/github.com/go-jose/go-jose/v3). The vulnerability is classified as CWE-248 (Uncaught Exception), representing a failure to handle exceptional conditions that should not terminate the process.

RemediationAI

Vendor-released patch: upgrade to go-jose v4.1.4 or later for v4.x deployments, or v3.0.5 or later for v3.x deployments. Update Go module dependencies using 'go get -u github.com/go-jose/go-jose/v4@v4.1.4' or 'go get -u github.com/go-jose/go-jose/v3@v3.0.5' as appropriate, then rebuild applications. For immediate mitigation without upgrading, restrict the keyAlgorithms parameter in ParseEncrypted(), ParseEncryptedJSON(), or ParseEncryptedCompact() calls to exclude key wrapping algorithms (those ending in KW), which causes parsing to fail before reaching the vulnerable code path. Alternatively, implement input validation to reject JWE objects where the encrypted_key field (second field in Compact Serialization, between first and second periods) is empty before passing to parsing functions. Organizations unable to patch immediately should review application configurations to determine if key wrapping algorithms are actually required for their use case. Full technical details and remediation guidance available at https://github.com/go-jose/go-jose/security/advisories/GHSA-78h2-9frx-2jm8.

Vendor StatusVendor

SUSE

Severity: High
Product Status
openSUSE Tumbleweed Fixed

Share

CVE-2026-34986 vulnerability details – vuln.today

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