Go-JOSE Library Security Patch: JWE Decryption Panic Vulnerability (CVE-2026-34986)
A critical security vulnerability in the widely-used Go-JOSE library triggers a panic during JWE decryption, forcing a mandatory patch to version 4.1.4. The flaw, tracked as CVE-2026-34986 and GHSA-78h2-9frx-2jm8, is a denial-of-service risk that can crash applications when processing malformed encrypted data. This is not a theoretical issue; it is a direct path to application instability for any service relying on this library for JSON Web Encryption.
The vulnerability specifically impacts the decryption of JSON Web Encryption (JWE) objects. A panic occurs when the `alg` field specifies a key wrapping algorithm (those ending in `KW`, except for `A128GCMKW`, `A192GCMKW`, and `A256GCMKW`) and the `encrypted_key` field is empty. This condition causes the library to dereference a nil pointer, immediately crashing the Go process. The patch in version 4.1.4 addresses this by adding proper nil checks before the vulnerable operation.
This update is marked as a security priority across dependency management systems. The `go-jose/go-jose/v4` library is a fundamental component for implementing JOSE standards (JWT, JWS, JWE) in the Go ecosystem, used by countless authentication, authorization, and data exchange services. The silent failure mode—a sudden panic—poses a significant availability threat, making systems vulnerable to crafted inputs that could disrupt critical operations. All downstream projects must urgently review their dependencies and apply this patch to mitigate the risk of service crashes.