CVE-2026-34986
HighCVSS 7.5Exploitation Probability (EPSS)
Low risk49th percentile - higher than 49% of all known CVEs
Summary
Go JOSE prior to versions 4.1.4 and 3.0.5 has a vulnerability where decrypting a JWE object can panic if the alg field indicates a key wrapping algorithm (ending in KW, except A128GCMKW, A192GCMKW, A256GCMKW) and the encrypted_key field is empty. The panic occurs when attempting to allocate a slice with zero or negative length. This can lead to denial of service.
Risk Assessment
The risk is a panic and denial of service caused by a remote attacker sending a specially crafted JWE object.
Recommendation
Upgrade to version 4.1.4 or 3.0.5, which fix this vulnerability.
Other vulnerabilities in Go JOSE
See all- CVE-2016-9123High
The go-jose library before version 1.0.5 suffers from a CBC-HMAC integer overflow on 32-bit architectures. An integer overflow could lead to authentication bypass for CBC-HMAC encrypted ciphertexts on these architectures.
- CVE-2016-9121Critical
The go-jose library before version 1.0.4 is vulnerable to an invalid curve attack in the ECDH-ES algorithm. When deriving a shared key, go-jose fails to check that the received public key is on the same curve as the receiver's static private key.
Original NVD description (English source)
Go JOSE provides an implementation of the Javascript Object Signing and Encryption set of standards in Go, including support for JSON Web Encryption (JWE), JSON Web Signature (JWS), and JSON Web Token (JWT) standards. Prior to 4.1.4 and 3.0.5, 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. This vulnerability is fixed in 4.1.4 and 3.0.5.

