Go JoseApplication · Go Jose Project

CVE-2026-34986

HIGH · 7.5 CVSS v3.1 Published 2026-04-06
Fix available
A fix is available. Upgrade to 3.0.5 / 4.1.4 or later.
See remediation →
84/100
Remediation priority · High
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.4 and 3.0.5, decrypting a JSON Web Encryption (JWE) object will panic if the alg field indicates a key wrapping algorithm (one ending in KW, 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. This 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. This 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. Panics can lead to denial of service. This vulnerability is fixed in 4.1.4 and 3.0.5.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Go JOSE library versions prior to 4.1.4 and 3.0.5 contain a denial-of-service vulnerability where decrypting a JWE (JSON Web Encryption) object will panic if the algorithm field specifies a key wrapping algorithm (ending in KW, excluding A128GCMKW, A192GCMKW, A256GCMKW) and the encrypted_key field is empty. The panic occurs in cipher.KeyUnwrap() when attempting to allocate a slice with zero or negative length.

MitigationEnsure the Go JOSE library is updated to version 4.1.4 or 3.0.5. Alternatively, when parsing JWE objects, do not include key wrapping algorithms in the list of accepted key algorithms to prevent the vulnerable code path from being reached.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Go JoseApplication
Affected:>= 3.0.0, < 3.0.5>= 4.0.0, < 4.1.4

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify Go JOSE library version in use
    Run 'go list -m all | grep -i jose' in your project directory, or check your go.mod file for the go-jose version
    Affected if Version is below 3.0.5 or between 3.0.5 and 4.0.0, or between 4.0.0 and 4.1.4 (i.e., any version < 3.0.5 or < 4.1.4)
  2. Confirm JWE decryption is used
    Search your codebase for calls to ParseEncrypted, ParseEncryptedJSON, or ParseEncryptedCompact functions from the go-jose library
    Affected if These functions are called and process JWE tokens in your application
  3. Identify key wrapping algorithm configuration
    Search for Algorithm field assignments or algorithm parameters passed to ParseEncrypted/ParseEncryptedJSON/ParseEncryptedCompact, or check your JWT/JOSE configuration for allowed algorithms
    Affected if The allowed algorithms list includes any key wrapping algorithm (e.g., A128KW, A192KW, A256KW, A128GCMKW, A192GCMKW, A256GCMKW) - note that only non-GCM key wrapping (A128KW, A192KW, A256KW) are vulnerable
  4. Verify if application processes external JWE tokens
    Review whether your application accepts JWE tokens from untrusted sources (e.g., user input, API requests, external services) that could contain an empty encrypted_key field
    Affected if Your application processes JWE tokens from external sources using key wrapping algorithms

You are affected if you use a go-jose version below 3.0.5 or below 4.1.4, your code uses JWE decryption functions, and you accept key wrapping algorithms (A128KW, A192KW, A256KW) from untrusted input.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 3.0.5 / 4.1.4 or later
Fixed in 3.0.54.1.4
Interim mitigation

Ensure the Go JOSE library is updated to version 4.1.4 or 3.0.5. Alternatively, when parsing JWE objects, do not include key wrapping algorithms in the list of accepted key algorithms to prevent the vulnerable code path from being reached.

Recommended fix High confidence

github.com/go-jose/go-jose/[email protected] for v3.x users, or github.com/go-jose/go-jose/[email protected] for v4.x users

  1. Identify the Go project that depends on the go-jose package by running 'go list -m all' or 'go mod graph | grep go-jose'
  2. Determine the currently used version of go-jose with 'go list -m github.com/go-jose/go-jose'
  3. For projects using go-jose v3.x (3.0.0 to 3.0.4): run 'go get github.com/go-jose/go-jose/[email protected]' to upgrade to the fixed version
  4. For projects using go-jose v4.x (4.0.0 to 4.1.3): run 'go get github.com/go-jose/go-jose/[email protected]' to upgrade to the fixed version
  5. Run 'go mod tidy' to update go.mod and go.sum with the new dependencies
  6. Rebuild the application with 'go build ./...'
  7. Run tests to verify the upgrade does not break existing functionality
Caveat Minimal risk - this is a patch release fixing a denial of service vulnerability; however, verify that existing JWE decryption functionality still works correctly after upgrading

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Go Jose Scoped from the published advisory
  • Consultation2.0 h
  • Implementation4.0 h
  • Testing6.0 h
  • Review / QA2.0 h
14.0 hours of engineering $2,380
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,808.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-34986 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-34986 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data