Go JOSE vulnerable to Improper Handling of Highly Compressed Data (Data Amplification)GHSA-c5q2-7r4c-mv6g
MEDIUMFix: go-jose/go-jose@0dd4dd5GHSA-c5q2-7r4c-mv6g is a medium-severity (CVSS 4.3) CWE-409 vulnerability in github.com/go-jose/go-jose/v4. A fix is available for github.com/go-jose/go-jose/v4 — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-c5q2-7r4c-mv6g.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
github.com/go-jose/go-jose/v4🐹github.com/go-jose/go-jose/v3🐹gopkg.in/go-jose/go-jose.v2🐹gopkg.in/square/go-jose.v2Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Impact
An attacker could send a JWE containing compressed data that used large amounts of memory and CPU when decompressed by Decrypt or DecryptMulti. Those functions now return an error if the decompressed data would exceed 250kB or 10x the compressed size (whichever is larger). Thanks to Enze Wang@Alioth and Jianjun Chen@Zhongguancun Lab (@zer0yu and @chenjj) for reporting.
Patches
The problem is fixed in the following packages and versions:
- github.com/go-jose/go-jose/v4 version 4.0.1
- github.com/go-jose/go-jose/v3 version 3.0.3
- gopkg.in/go-jose/go-jose.v2 version 2.6.3
The problem will not be fixed in the following package because the package is archived:
- gopkg.in/square/go-jose.v2
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/go-jose/go-jose/v4 | all versions | 4.0.1go get github.com/go-jose/go-jose/v4@v4.0.1 |
| 🐹Go | github.com/go-jose/go-jose/v3 | all versions | 3.0.3go get github.com/go-jose/go-jose/v3@v3.0.3 |
| 🐹Go | gopkg.in/go-jose/go-jose.v2 | all versions | 2.6.3go get gopkg.in/go-jose/go-jose.v2@v2.6.3 |
| 🐹Go | gopkg.in/square/go-jose.v2 | all versions | No fix |
Affected Products
fedorafedoraprojectgo-josego-jose_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/go-jose/go-jose/v4, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/go-jose/go-jose/v4 to 4.0.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-c5q2-7r4c-mv6g is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.Source: Red Hat security advisory for GHSA-c5q2-7r4c-mv6g (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| OADP-1.3-RHEL-9 | oadp/oadp-velero-plugin-rhel9:1.3.1-16 | RHSA-2024:1859 |
| OpenShift Custom Metrics Autoscaler 2 | custom-metrics-autoscaler/custom-metrics-autoscaler-adapter-rhel8:2.12.1-376 | RHSA-2024:1812 |
| OpenShift-Pipelines-1.15-RHEL-8 | openshift-pipelines-client-0:1.15.0-11496.el8 | RHEA-2024:4022 |
| Red Hat Advanced Cluster Management for Kubernetes 2.12 for RHEL 9 | rhacm2/acm-cli-rhel9:v2.12.0-17 | RHSA-2024:8974 |
| Red Hat Advanced Cluster Security 4.4 | advanced-cluster-security/rhacs-main-rhel8:4.4.0-17 | RHSA-2024:1570 |
| Red Hat Ceph Storage 5.3 | rhceph/keepalived-rhel8:2.1.5-44 | RHBA-2025:1479 |
| Red Hat Ceph Storage 7.1 | rhceph/ceph-nvmeof-cli-rhel9:1.2.19-1 | RHBA-2025:1772 |
| Red Hat Enterprise Linux 8 | container-tools:rhel8-8100020240419145834.afee755d | RHSA-2024:3254 |
Frequently Asked Questions
Is GHSA-c5q2-7r4c-mv6g in your dependencies?
Find it across Go, including transitive dependencies.