CVE-2026-116585: Go JOSE: Panic during CBC-HMAC processing
Summary
Decrypting a ciphertext with "A128CBC-HS256", "A192CBC-HS384", or "A256CBC-HS512" can result in a panic on untrusted input.
Note this advisory is the same as https://github.com/go-jose/go-jose/security/advisories/GHSA-6mp9-8xrw-74r4.
Details
Insufficient validation of parameters can lead to attempting to index into an empty buffer. See https://github.com/go-jose/go-jose/pull/292.
Workarounds
If the application does not require the CBC-HMAC modes for content encryption, and is using github.com/go-jose/go-jose/v4, do not include them in the list of ContentEncryption algorithms passed to ParseEncrypted / ParseEncryptedJSON / ParseEncryptedCompact.
Impact
Denial of service vulnerability. Any application which decrypts untrusted ciphertexts with the indicated algorithms is affected.
Acknowledgements
Thanks to Joshua Rogers of AISLE Research for reporting this problem.
Other sources
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.5, decrypting untrusted JWE ciphertext with A128CBC-HS256, A192CBC-HS384, or A256CBC-HS512 can pass an empty ciphertext buffer to CBC-HMAC unpadding. Insufficient validation allows the empty buffer to be indexed, causing a panic and denial of service. Applications that decrypt attacker-controlled ciphertext with one of these content-encryption algorithms are affected. This issue is fixed in version 4.1.5.
— Ubuntu
Go JOSE: Panic during CBC-HMAC processing
— Microsoft
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go/github.com/go-jose/go-jose/v4to a version that resolves this vulnerability.Fixed in 4.1.5 - Upgrade
Upgrade
azurelinux/skopeoto a version that resolves this vulnerability.Fixed in 1.14.4-16 - Upgrade
Upgrade
azurelinux/telegrafto a version that resolves this vulnerability.Fixed in 1.31.0-37 - Upgrade
Upgrade
azurelinux/containerized-data-importerto a version that resolves this vulnerability.Fixed in 1.62.0-10 - Upgrade
Upgrade
github.com/go-jose/go-jose/v4to a version that resolves this vulnerability.Fixed in 4.1.5 - Configuration
If CBC-HMAC modes are not required, do not include A128CBC-HS256, A192CBC-HS384, or A256CBC-HS512 in the ContentEncryption algorithms passed to ParseEncrypted, ParseEncryptedJSON, or ParseEncryptedCompact.
github.com/go-jose/go-jose/v4 ContentEncryption algorithms = Exclude A128CBC-HS256, A192CBC-HS384, and A256CBC-HS512
Event History
Frequently Asked Questions
Which deployments are exposed to this denial-of-service issue?
Applications are affected if they decrypt attacker-controlled JWE ciphertext using A128CBC-HS256, A192CBC-HS384, or A256CBC-HS512. The issue applies to Go JOSE versions before 4.1.5.
What must an attacker be able to do to trigger the problem?
An attacker needs to supply JWE ciphertext that the application attempts to decrypt with one of the affected CBC-HMAC content-encryption algorithms. An empty ciphertext buffer can reach unpadding and trigger a panic.
How can I determine whether my application is affected?
Review whether the application accepts untrusted JWE input for decryption and whether any of the three affected CBC-HMAC algorithms are enabled or used. Also check whether the Go JOSE version is earlier than 4.1.5.
What remediation is available?
Upgrade Go JOSE to version 4.1.5, which fixes the issue.