Vulnerabilities in pkg:golang/github.com/go-jose/go-jose/v3
PACKAGECVE-2026-34986 is a HIGH (CVSS 7.5) go jose panics vulnerability (CWE-248: Uncaught Exception) affecting Github.com/go jose/go jose/v4 libraries in the Go ecosystem. The issue involves go jose panics in jwe decryption. Remediation is available by upgrading affected packages to version 4.1.4, 3.0.5.
pkg:golang/github.com/go-jose/go-jose/v3
Vulnerability advisories affecting package pkg:golang/github.com/go-jose/go-jose/v3. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-78h2-9frx-2jm8 | CVE-2026-34986 | HIGH | Go JOSE Panics in JWE decryption |
| GHSA-c6gw-w398-hv78 | CVE-2025-27144 | MODERATE | DoS in go-jose Parsing |
| GHSA-c5q2-7r4c-mv6g | CVE-2024-28180 | MODERATE | Go JOSE vulnerable to Improper Handling of Highly Compressed Data (Data Amplification) |
| GHSA-2c7c-3mj9-8fqh | - | MODERATE | Decryption of malicious PBES2 JWE objects can consume unbounded system resources |
CVE-2026-34986 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-34986
To remediate this vulnerability, upgrade all affected Github.com/go jose/go jose/v4 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/go-jose/go-jose/v4 to 4.1.4
Upgrade github.com/go-jose/go-jose/v3 to 3.0.5
Upgrade github.com/go-jose/go-jose to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/go-jose/go-jose/v4
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-34986, inspect your project dependencies for Github.com/go jose/go jose/v4:
inspect dependencies for github.com/go-jose/go-jose/v4
Analyze the terminal output to locate any version of Github.com/go jose/go jose/v4 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.1.4), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-248: Uncaught Exception, where an exception is thrown from a function, but it is not caught. In Github.com/go jose/go jose/v4, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-34986 Affected Github.com/go jose/go jose/v4 Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/go-jose/go-jose/v4
|
Go |
< 4.1.4
|
4.1.4
|
|
github.com/go-jose/go-jose/v3
|
Go |
< 3.0.5
|
3.0.5
|
|
github.com/go-jose/go-jose
|
Go |
≤ 2.6.3
|
|
References
Frequently Asked Questions
What is CVE-2026-34986?
Which Github.com/go jose/go jose/v4 versions are affected?
What version fixes CVE-2026-34986?
Is github.com/go-jose/go-jose/v4 affected?
Is github.com/go-jose/go-jose/v3 affected?
What is the CVSS score of CVE-2026-34986?
What CWE is associated with CVE-2026-34986?
How can I check Go dependencies for CVE-2026-34986?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-78h2-9frx-2jm8",
"modified" : "2026-04-06T23:11:46Z",
"published" : "2026-04-03T03:28:56Z",
"aliases" : [ "CVE-2026-34986" ],
"summary" : "Go JOSE Panics in JWE decryption",
"details" : "### Impact\n\nDecrypting a JSON Web Encryption (JWE) object will panic if the `alg` field indicates a key wrapping algorithm ([one ending in `KW`](https://pkg.go.dev/github.com/go-jose/go-jose/v4#pkg-constants), 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`.\n\nThis 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.\n\nThis 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.\n\nPanics can lead to denial of service.\n\n### Fixed In\n\n4.1.4 and v3.0.5\n\n### Workarounds\n\nIf the list of `keyAlgorithms` passed to `ParseEncrypted()` / `ParseEncryptedJSON()` / `ParseEncryptedCompact()` does not include key wrapping algorithms (those ending in `KW`), your application is unaffected.\n\nIf your application uses key wrapping, you can prevalidate to the JWE objects to ensure the `encrypted_key` field is nonempty. If your application accepts JWE Compact Serialization, apply that validation to the corresponding field of that serialization (the data between the first and second `.`).\n\n### Thanks\n\nThanks to Datadog's Security team for finding this issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/go-jose/go-jose/v4"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.1.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/go-jose/go-jose/v3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.0.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/go-jose/go-jose"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "2.6.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/go-jose/go-jose/security/advisories/GHSA-78h2-9frx-2jm8"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34986"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/go-jose/go-jose"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/github.com/go-jose/go-jose/v4#pkg-constants"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-248" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-03T03:28:56Z",
"nvd_published_at" : "2026-04-06T17:17:11Z"
}
}