Executive brief
Go JOSE is a software library used by developers to handle encrypted and signed data, such as login tokens and secure messages. A flaw in how the library processes certain encrypted objects allows an attacker to send a specially crafted message that causes the application to crash. This results in a denial-of-service, potentially taking down critical authentication or data processing services.
Technical details
A vulnerability exists in Go JOSE's JWE decryption logic where the library fails to validate the length of the 'encrypted_key' field when a key wrapping algorithm (ending in 'KW') is specified. Specifically, the 'cipher.KeyUnwrap()' function in 'key_wrap.go' attempts to allocate a slice with a zero or negative length based on the empty field, triggering a Go runtime panic. This is reachable via 'ParseEncrypted', 'ParseEncryptedJSON', or 'ParseEncryptedCompact' followed by a 'Decrypt' call. The issue affects versions prior to 4.1.4 and 3.0.5. Applications are only vulnerable if they include key wrapping algorithms in their list of accepted key algorithms during parsing.
Affected products
- Go JOSE go-jose/v3 < 3.0.5
- Go JOSE go-jose/v4 < 4.1.4
Timeline
- 2026-03-31: patched: Fixes released in versions 4.1.4 and 3.0.5
- 2026-03-31: advisory: GitHub Security Advisory published
- 2026-04-06: disclosed: CVE-2026-34986 published to NVD
References
- https://github.com/go-jose/go-jose/security/advisories/GHSA-78h2-9frx-2jm8
- https://pkg.go.dev/github.com/go-jose/go-jose/v4
- https://access.redhat.com/errata/RHSA-2026:10125
- https://access.redhat.com/errata/RHSA-2026:10130
- https://access.redhat.com/errata/RHSA-2026:10135
- https://access.redhat.com/errata/RHSA-2026:10175
- https://access.redhat.com/errata/RHSA-2026:11070