# CVE-2025-30204: jwt-go allows excessive memory allocation during header parsing

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.81%, higher than 58% of CVEs (2026-12-01)
- Published: 2025-03-21T21:42:01.382Z
- Modified: 2026-11-23T21:12:29.361Z
- Also known as: GHSA-mh63-6h87-95cp, GO-2025-3553
- Related: RHEA-2025:4438, RHSA-2025:3344, RHSA-2025:3411, RHSA-2025:3616, RHSA-2025:3618, RHSA-2025:3698, RHSA-2025:4462, RHSA-2025:4569, RHSA-2025:4669, RHSA-2025:7404, RHSA-2025:7407, RHSA-2025:7425, RHSA-2025:7475, RHSA-2025:7479, RHSA-2025:7503, RHSA-2025:7967, RHSA-2025:8075, RHSA-2025:8267, RHSA-2026:1536
- Weaknesses: CWE-405
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- golang-jwt jwt: >= 3.2.0, < 4.5.2; >= 5.0.0-rc.1, < 5.2.2
- github.com/golang-jwt/jwt/v5 (Go): from 5.0.0-rc.1 before 5.2.2
- github.com/golang-jwt/jwt/v4 (Go): before 4.5.2
- github.com/golang-jwt/jwt (Go): from 3.2.0 up to 3.2.2; all versions

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:4.0 High `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`

## References

- <https://github.com/golang-jwt/jwt/security/advisories/GHSA-mh63-6h87-95cp> (advisory, web)
- <https://github.com/golang-jwt/jwt/commit/0951d184286dece21f73c85673fd308786ffe9c3> (fix, web)
- <https://github.com/golang-jwt/jwt/commit/bf316c48137a1212f8d0af9288cc9ce8e59f1afb> (web)
- <https://security.netapp.com/advisory/ntap-20250404-0002/>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-30204> (advisory)
- <https://github.com/golang-jwt/jwt> (package)
- <https://security.netapp.com/advisory/ntap-20250404-0002> (web)

## Sources

- CVE List: [CVE-2025-30204](https://www.cve.org/CVERecord?id=CVE-2025-30204), CVE Terms of Use, modified 2025-04-10
- GitHub Advisory Database: [GHSA-mh63-6h87-95cp](https://github.com/advisories/GHSA-mh63-6h87-95cp), CC-BY-4.0, modified 2026-09-10
- Go Vulnerability Database: [GO-2025-3553](https://pkg.go.dev/vuln/GO-2025-3553), CC-BY-4.0, modified 2026-11-23
- NVD: [CVE-2025-30204](https://nvd.nist.gov/vuln/detail/CVE-2025-30204), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-30204 · Whole record: https://cve.day/CVE-2025-30204.json · Rebuilt by cve.day 2026-11-25T22:58:55.415Z
