CVE-2025-30204
HIGH 7.5CVSS 3.1jwt-go allows excessive memory allocation during header parsing
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.
- Published
- 21 Mar 2025
- Last modified
- 23 Nov 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-405
- Also known as
- GHSA-mh63-6h87-95cpGO-2025-3553
- Sources
- NVDJSONOSV GHSA-mh63-6h87-95cpJSONOSV GO-2025-3553JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N | |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | Go | github.com/golang-jwt/jwt/v5 | >= 5.0.0-rc.1, < 5.2.2 | 5.2.2 |
| OSV | Go | github.com/golang-jwt/jwt/v4 | < 4.5.2 | 4.5.2 |
| OSV | Go | github.com/golang-jwt/jwt | >= 3.2.0, <= 3.2.2 | |
| OSV | Go | github.com/golang-jwt/jwt | all versions |
References
- https://github.com/golang-jwt/jwt/commit/0951d184286dece21f73c85673fd308786ffe9c3 · WEB, FIX
- https://github.com/golang-jwt/jwt/commit/bf316c48137a1212f8d0af9288cc9ce8e59f1afb · WEB
- https://github.com/golang-jwt/jwt/security/advisories/GHSA-mh63-6h87-95cp · WEB, ADVISORY
- https://security.netapp.com/advisory/ntap-20250404-0002/ · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-30204 · ADVISORY
- https://github.com/golang-jwt/jwt · PACKAGE
History
- 25 Nov 2026 20:57 UTC · NVD: first stored (published 21 Mar 2025)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 26 Mar 2025)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 21 Mar 2025)