Go JOSE: Panics in JSON parsingGHSA-vvm8-gf78-28g4
Fix: go-jose/go-jose#290GHSA-vvm8-gf78-28g4 is a CWE-674 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.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
github.com/go-jose/go-jose/v4🐹github.com/go-jose/go-jose/v3Real-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
Summary
Parsing deeply nested JSON structures can hit Go's stack limit, causing the application to crash.
Note: this advisory is the same as https://github.com/go-jose/go-jose/security/advisories/GHSA-6mp9-8xrw-74r4.
Impact
Denial of service vulnerability. Any application that parses untrusted JSON via go-jose is exposed.
Workarounds
Reject large inputs before parsing them.
Acknowledgements
Thanks to Dohyun Kim (@azza999), Joshua Rogers of AISLE Research, and Sueun Cho for alerting us to the need to patch this.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/go-jose/go-jose/v4 | all versions | 4.1.5go get github.com/go-jose/go-jose/v4@v4.1.5 |
| 🐹Go | github.com/go-jose/go-jose/v3 | all versions | No fix |
Detection & 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.1.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-vvm8-gf78-28g4 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
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.
This vulnerability is rated as having Important impact because an unauthenticated remote attacker can trigger a denial of service against services that process JOSE structures, causing affected components to crash without recovery. In Red Hat environments such as OpenShift and Advanced Cluster Management, go-jose is…
Mitigation for this issue is either not available or the currently available options do not 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-vvm8-gf78-28g4 (CC BY 4.0)
Frequently Asked Questions
Is GHSA-vvm8-gf78-28g4 in your dependencies?
Find it across Go, including transitive dependencies.