Uncaught Exception Affecting github.com/go-jose/go-jose/v3 package, versions <3.0.5


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.65% (47th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GITHUBCOMGOJOSEGOJOSEV3-15875220
  • published3 Apr 2026
  • disclosed3 Apr 2026
  • creditDatadog Security team

Introduced: 3 Apr 2026

CVE-2026-34986  (opens in a new tab)
CWE-248  (opens in a new tab)

How to fix?

Upgrade github.com/go-jose/go-jose/v3 to version 3.0.5 or higher.

Overview

Affected versions of this package are vulnerable to Uncaught Exception in the cipher.KeyUnwrap function when decrypting a JSON Web Encryption (JWE) object with a key wrapping algorithm (ending in 'KW', except for 'A128GCMKW', 'A192GCMKW', and 'A256GCMKW') and the encrypted_key field is empty. An attacker can cause a panic and disrupt service by submitting a crafted JWE object with an empty encrypted_key field or by directly invoking cipher.KeyUnwrap with a ciphertext parameter less than 16 bytes long.

Note:

This is only exploitable if the list of accepted key algorithms includes key wrapping algorithms.

Workaround

This vulnerability can be mitigated by prevalidating JWE objects to ensure the encrypted_key field is nonempty, or by excluding key wrapping algorithms from the list of accepted key algorithms.

CVSS Base Scores

version 4.0
version 3.1