CVE-2025-30204 is a high-severity (CVSS 7.5) CWE-405 vulnerability in github.com/golang-jwt/jwt/v5. A fix is available for github.com/golang-jwt/jwt/v5 — see the affected versions and patch details below.
jwt-go allows excessive memory allocation during header parsing
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- 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 CVE-2025-30204.
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/golang-jwt/jwt/v5🐹github.com/golang-jwt/jwt/v4🐹github.com/golang-jwt/jwtReal-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
golang-jwt is a Go implementation of JSON Web Tokens. Starting in version 3.2.0 and prior to versions 5.2.2 and 4.5.2, the function parse.ParseUnverified splits (via a call to strings.Split) its argument (which is untrusted data) on periods. As a result, in the face of a malicious request whose Authorization header consists of Bearer followed by many period characters, a call to that function incurs allocations to the tune of O(n) bytes (where n stands for the length of the function's argument), with a constant factor of about 16. This issue is fixed in 5.2.2 and 4.5.2.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/golang-jwt/jwt/v5 | ≥ 5.0.0-rc.1&&< 5.2.2 | 5.2.2go get github.com/golang-jwt/jwt/v5@v5.2.2 |
| 🐹Go | github.com/golang-jwt/jwt/v4 | all versions | 4.5.2go get github.com/golang-jwt/jwt/v4@v4.5.2 |
| 🐹Go | github.com/golang-jwt/jwt | ≥ 3.2.0 | 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/golang-jwt/jwt/v5, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/golang-jwt/jwt/v5 to 5.2.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-30204 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.
Red Hat Product Security does not have a recommended mitigation at this time.Source: Red Hat security advisory for CVE-2025-30204 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Cryostat 4 on RHEL 9 | cryostat/cryostat-agent-init-rhel9:0.5.0-9 | RHSA-2025:3503 |
| multicluster engine for Kubernetes 2.4 for RHEL 8 | multicluster-engine/addon-manager-rhel8:v2.4.9-5 | RHSA-2025:8390 |
| multicluster engine for Kubernetes 2.5 for RHEL 8 | multicluster-engine/agent-service-rhel8:v2.5.9-8 | RHSA-2025:4473 |
| multicluster engine for Kubernetes 2.6 for RHEL 8 | multicluster-engine/assisted-image-service-rhel8:v2.6.8-8 | RHSA-2025:13900 |
| multicluster engine for Kubernetes 2.7 for RHEL 8 | multicluster-engine/assisted-service-8-rhel8:v2.7.5-15 | RHSA-2025:11573 |
| multicluster engine for Kubernetes 2.8 for RHEL 8 | multicluster-engine-assisted-service-8-container-v2.8.3-14 | RHSA-2025:16101 |
| multicluster-globalhub 1.2 for RHEL 9 | multicluster-globalhub/multicluster-globalhub-agent-rhel9:v1.2.3-2 | RHSA-2025:9388 |
| multicluster-globalhub 1.4 for RHEL 9 | multicluster-globalhub/multicluster-globalhub-agent-rhel9:v1.4.1-5 | RHSA-2025:8384 |
Frequently Asked Questions
Is CVE-2025-30204 in your dependencies?
Find it across Go, including transitive dependencies.