CVE-2026-34986
JSON

7.5high

Go JOSE affect by a panic in JWE decryption

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
0.66% (higher than 52% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-78h2-9frx-2jm8GO-2026-4945

Description

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.

Affected

Product or packageVersionsReported by
go-jose go-jose>= 4.0.0, < 4.1.4, < 3.0.5CVE List
cryostat/cryostat-storage-rhel9Not specified
Not affected: from 4.2.0-13 before *
CVE List
podmanNot specified
Not affected: from 7:5.8.2-1.el10_2 before *, from 6:5.4.0-15.el10_0.1 before *, from 6:5.8.2-1.el9_8 before *, from 2:4.4.1-22.el9_2.11 before *, from 4:4.9.4-20.el9_4.3 before *, from 5:5.4.0-20.el9_6.3 before *
CVE List
opentelemetry-collectorNot specified
Not affected: from 0:0.144.0-2.el10_2 before *, from 0:0.144.0-2.el10_0 before *, from 0:0.144.0-2.el9_8 before *, from 0:0.144.0-2.el9_4 before *, from 0:0.144.0-2.el9_6 before *
CVE List
osbuild-composerNot specified
Not affected: from 0:165.1-2.el10_2 before *, from 0:134.1-9.el10_0 before *, from 0:101.5-1.el8_10 before *, from 0:165.1-2.el9_8 before *, from 0:101.3-4.el9_4.2 before *, from 0:132.2-8.el9_6 before *
CVE List
image-builderNot specified
Not affected: from 0:52.1-1.el10_2 before *, from 0:52.1-1.el9_8 before *
CVE List
rh-podman-desktopNot specified
Not affected: from 0:1.1.2-1.el10_2 before *
CVE List
skopeoNot specified
Not affected: from 2:1.18.1-3.el10_0.1 before *, from 2:1.11.4-0.1.el9_2.6 before *, from 2:1.14.6-1.el9_4 before *, from 2:1.18.1-5.el9_6.1 before *
CVE List
buildahNot specified
Not affected: from 2:1.39.9-1.el10_0 before *, from 2:1.41.8-3.el9_7 before *, from 2:1.43.1-1.el9_8 before *, from 1:1.29.7-1.el9_2.5 before *, from 2:1.33.15-1.el9_4.1 before *, from 2:1.39.9-1.el9_6 before *
CVE List
container-tools:rhel8Not specified
Not affected: from 8100020260520103055.afee755d before *, from 8100020260701102925.afee755d before *, from 8080020260721142025.63b34585 before *
CVE List
cri-oNot specified
Not affected: from 0:1.25.5-36.rhaos4.12.git2e7f657.el8 before *, from 0:1.26.5-32.rhaos4.13.git1088e36.el8 before *, from 0:1.29.13-14.rhaos4.16.git84cfdc6.el8 before *, from 0:1.31.13-14.rhaos4.18.gitf2de9ac.el8 before *, from 0:1.32.13-11.rhaos4.19.git089e95c.el9 before *, from 0:1.33.13-5.rhaos4.20.git7ebc848.el9 before *
CVE List
custom-metrics-autoscaler/custom-metrics-autoscaler-adapter-rhel9Not specified
Not affected: from 1780101236 before *
CVE List

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
redhat-SADP7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-131CWE-248

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
Impact

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.

Fixed In

4.1.4 and v3.0.5

Workarounds

If the list of keyAlgorithms passed to ParseEncrypted() / ParseEncryptedJSON() / ParseEncryptedCompact() does not include key wrapping algorithms (those ending in KW), your application is unaffected.

If 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 .).

Thanks

Thanks to Datadog's Security team for finding this issue.

Go Vulnerability Database

The go-jose package is subject to a panic when decrypting certain JSON Web Encryption (JWE) tokens. This occurs when an attacker can provide a maliciously crafted JWE token that triggers an unhandled exception during the decryption process, leading to a denial-of-service.

NVD (es)

pendiente...

References

https://github.com/go-jose/go-jose/security/advisories/GHSA-78h2-9frx-2jm8advisory, mitigation, vendor-advisory, web
https://pkg.go.dev/github.com/go-jose/go-jose/v4#pkg-constantsproduct, technical-description, web
https://access.redhat.com/security/cve/CVE-2026-34986vdb-entry
https://bugzilla.redhat.com/show_bug.cgi?id=2455470issue-tracking
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-34986.json
https://access.redhat.com/errata/RHSA-2026:65906vendor-advisory
https://access.redhat.com/errata/RHSA-2026:65838vendor-advisory
https://access.redhat.com/errata/RHSA-2026:62548vendor-advisory
https://access.redhat.com/errata/RHSA-2026:66385vendor-advisory
https://access.redhat.com/errata/RHSA-2026:17789vendor-advisory
https://access.redhat.com/errata/RHSA-2026:60452vendor-advisory
https://access.redhat.com/errata/RHSA-2026:60444vendor-advisory

Related

Sources

SourceRecordLicence
CVE ListCVE-2026-34986 changed 2026-09-18CVE Terms of Use
GitHub Advisory DatabaseGHSA-78h2-9frx-2jm8 changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2026-4945 changed 2026-06-01CC-BY-4.0
NVDCVE-2026-34986 changed 2026-10-23Public domain