CVE-2026-34986
Packer vulnerability analysis and mitigation

Overview

CVE-2026-34986 is a denial-of-service vulnerability in the Go JOSE library (github.com/go-jose/go-jose) caused by a panic during JSON Web Encryption (JWE) decryption. When a JWE object specifies a key wrapping algorithm (any KW-suffixed algorithm except A128GCMKW, A192GCMKW, and A256GCMKW) and the encrypted_key field is empty, the library panics attempting to allocate a slice of zero or negative length. Affected versions include go-jose/v3 < 3.0.5, go-jose/v4 < 4.1.4, and all versions of go-jose/v2 (≤ 2.6.3, no patch available). The vulnerability was published on March 31, 2026, and carries a CVSS v3.1 base score of 7.5 (High) (Github Advisory, go-jose Advisory).

Technical details

The root cause is an incorrect buffer size calculation (CWE-131) combined with an uncaught exception/panic (CWE-248) in cipher.KeyUnwrap() within key_wrap.go. When encrypted_key is empty, the function attempts to allocate a slice with a zero or negative length derived from the ciphertext length, triggering a Go runtime panic. The vulnerable code path is reachable via ParseEncrypted(), ParseEncryptedJSON(), or ParseEncryptedCompact() followed by a call to Decrypt() on the resulting object; it is also reachable by calling cipher.KeyUnwrap() directly with any ciphertext parameter shorter than 16 bytes. The attack requires no authentication or privileges and is network-accessible, making it trivially exploitable against any application that accepts externally supplied JWE objects and permits key wrapping algorithms (Github Advisory, go-jose Advisory).

Impact

Successful exploitation causes the Go application to panic and crash, resulting in a denial of service. There is no confidentiality or integrity impact — the vulnerability exclusively affects availability. Any service that processes externally supplied JWE tokens using key wrapping algorithms (e.g., authentication services, API gateways, identity providers) is at risk of being repeatedly crashed by a single malformed request, potentially causing sustained outages. Downstream projects that embed go-jose — including HashiCorp Vault, Podman, Buildah, Skopeo, containerd, oauth2-proxy, Grafana, and many others — are transitively affected (Github Advisory, Red Hat Bugzilla).

Exploitability

No public exploit code or active in-the-wild exploitation has been reported. The EPSS score is approximately 0.035% (11th percentile), indicating a low near-term exploitation probability (Github Advisory). The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. However, exploitation is conceptually trivial — an attacker need only craft a JWE object with a KW-type alg header and an empty encrypted_key field and submit it to any vulnerable endpoint that decrypts JWE tokens. No threat actor attribution has been identified. The vulnerability was discovered by Datadog's Security team (go-jose Advisory).

Exploitation steps

  1. Reconnaissance: Identify applications that accept and decrypt JWE tokens using the go-jose library (v2, v3 < 3.0.5, or v4 < 4.1.4), particularly those exposing HTTP endpoints that process encrypted JWT/JWE inputs (e.g., token exchange, decryption APIs).
  2. Craft malicious JWE object: Construct a JWE JSON object with the alg header set to a key wrapping algorithm such as A128KW, A192KW, A256KW, RSA-OAEP, or PBES2-HS256+A128KW, and set the encrypted_key field to an empty string ("").
    {
      "protected": "<base64url({\"alg\":\"A128KW\",\"enc\":\"A128CBC-HS256\"})",
      "encrypted_key": "",
      "iv": "<valid_iv>",
      "ciphertext": "<any_value>",
      "tag": "<any_value>"
    }
  3. Submit to target: Send the crafted JWE object to the vulnerable application endpoint (e.g., via HTTP POST with Content-Type: application/json or as a Bearer token).
  4. Trigger panic: The application calls ParseEncrypted() followed by Decrypt(), which invokes cipher.KeyUnwrap() in key_wrap.go with an empty ciphertext, causing a Go runtime panic and crashing the service.
  5. Repeat for sustained DoS: Repeatedly send the malformed JWE to prevent service recovery if the application does not have automatic restart mechanisms (go-jose Advisory, Github Advisory).

Indicators of compromise

  • Logs: Go runtime panic stack traces in application logs referencing key_wrap.go and cipher.KeyUnwrap() or runtime: makeslice: len out of range; repeated panic/crash entries in service logs correlated with inbound JWE decryption requests.
  • Network: Repeated HTTP requests to JWE decryption or token exchange endpoints containing JWE objects with an empty encrypted_key field (second segment of compact serialization is empty, i.e., header..iv.ciphertext.tag); unusual volume of requests to authentication or token endpoints from a single source IP.
  • Process: Unexpected Go application process restarts or crashes; process supervisor (systemd, Kubernetes) logs showing repeated container/service restarts coinciding with inbound network activity.

Mitigation and workarounds

Upgrade to github.com/go-jose/go-jose/v3 version 3.0.5 or github.com/go-jose/go-jose/v4 version 4.1.4; note that v2 (≤ 2.6.3) has no patch and should be migrated to v3 or v4. If immediate upgrade is not possible, two workarounds are available: (1) ensure the keyAlgorithms list passed to ParseEncrypted() / ParseEncryptedJSON() / ParseEncryptedCompact() does not include any KW-suffixed algorithms, which prevents the vulnerable code path from being reached; or (2) prevalidate incoming JWE objects to confirm the encrypted_key field is non-empty before calling Decrypt() — for Compact Serialization, verify the second .-delimited segment is non-empty (go-jose Advisory, Github Advisory). Red Hat has issued numerous errata (e.g., RHSA-2026:10135, RHSA-2026:19173, RHSA-2026:22937) addressing this in RHEL 9 and 10 packages (Red Hat Bugzilla).

Community reactions

The vulnerability was discovered and responsibly disclosed by Datadog's Security team, credited in the official advisory (go-jose Advisory). Red Hat tracked the issue as high severity and issued a large number of errata across RHEL 9 and 10 product lines, reflecting the broad impact of go-jose as a transitive dependency in the container and cloud-native ecosystem (Red Hat Bugzilla). The vulnerability propagated widely through downstream projects including HashiCorp Vault, Podman, Buildah, Skopeo, containerd, Grafana, oauth2-proxy, and CircleCI Server, prompting patch releases across the ecosystem.

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

golang-gopkg-square-go-jose.v2

Affected

sid

golang-gopkg-square-go-jose.v2

Affected

trixie

golang-gopkg-square-go-jose.v2

Affected

Ubuntu

Unknown

devel

golang-github-go-jose-go-jose

Unknown

focal (esm-apps)

golang-gopkg-square-go-jose.v2

Unknown

jammy

golang-gopkg-square-go-jose.v2

Unknown

jammy (esm-apps)

golang-gopkg-square-go-jose.v2

Unknown

noble

golang-github-go-jose-go-jose

Unknown

noble (esm-apps)

golang-github-go-jose-go-jose

Unknown

resolute

golang-github-go-jose-go-jose

Unknown

resolute (esm-apps)

golang-github-go-jose-go-jose

Unknown

RHEL / CentOS

Fixed

OpenShift

el8:cri-o/cri-o-0:1.25.5-36.rhaos4.12.git2e7f657.el8

Fixed

RHEL 8

:appstream:container-tools:rhel8/buildah/buildah

Fixed

RHEL 9

:appstream:buildah-1:1.29.7-1.el9_2.5.src

Fixed

RHEL 10

buildah-2:1.39.9-1.el10_0.src

Fixed

Alpine

Fixed

edge

skopeo: 1.20.1-r0

Fixed

v3.23

skopeo: 1.20.1-r0

Fixed

SourceThis report was generated using AI

Related Packer vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-84304HIGH8.7
  • cAdvisor logocAdvisor
  • envoy-gateway-fips-1.8
NoYesSep 01, 2026
CVE-2026-78662HIGH7.5
  • Docker logoDocker
  • kubescape-server-fips
NoYesSep 02, 2026
CVE-2026-56855HIGH7.5
  • Docker logoDocker
  • fulcio-fips
NoYesSep 02, 2026
CVE-2026-19589HIGH7.1
  • Packer logoPacker
  • cpe:2.3:a:hashicorp:packer
NoYesAug 17, 2026
CVE-2026-71557MEDIUM6.3
  • Packer logoPacker
  • kyverno-fips-1.17
NoYesAug 07, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management