{"id":"CVE-2025-30204","published":"2025-03-21T21:42:01Z","modified":"2025-04-10T13:03:19Z","title":"jwt-go allows excessive memory allocation during header parsing","vendor":"golang-jwt","product":"jwt","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01091,"percentile":0.64971,"provenance":"source"},"cwes":[{"id":"CWE-405","name":"Asymmetric Resource Consumption (Amplification)"}],"references":[{"url":"https://github.com/golang-jwt/jwt/security/advisories/GHSA-mh63-6h87-95cp","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/golang-jwt/jwt/commit/0951d184286dece21f73c85673fd308786ffe9c3","tags":["x_refsource_MISC"]},{"url":"https://github.com/golang-jwt/jwt/commit/bf316c48137a1212f8d0af9288cc9ce8e59f1afb","tags":["x_refsource_MISC"]},{"url":"https://security.netapp.com/advisory/ntap-20250404-0002/","tags":[]}],"priority":{"score":18.2,"factors":[{"name":"EPSS percentile","points":12.99},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"golang-jwt","affectedVersions":[{"vendor":"golang-jwt","product":"jwt","versions":[">= 3.2.0, < 4.5.2",">= 5.0.0-rc.1, < 5.2.2"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2025-03-24T14:10:18.281694Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/golang-jwt/jwt/v5","vulnerableRanges":[">=5.0.0-rc.1, <5.2.2"],"patched":["5.2.2"],"from":["GHSA-mh63-6h87-95cp","GO-2025-3553"],"provenance":"source"},{"ecosystem":"Go","package":"github.com/golang-jwt/jwt/v4","vulnerableRanges":["<4.5.2"],"patched":["4.5.2"],"from":["GHSA-mh63-6h87-95cp","GO-2025-3553"],"provenance":"source"},{"ecosystem":"Go","package":"github.com/golang-jwt/jwt","vulnerableRanges":[">=3.2.0, <=3.2.2","all versions"],"patched":[],"from":["GHSA-mh63-6h87-95cp","GO-2025-3553"],"provenance":"source"}],"euvd":{"id":"EUVD-2025-7207","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-golang-jwt-jwt-cve-2024-51744","parents":[{"from":"CVE-2024-51744","to":"CVE-2025-30204","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/golang-jwt/jwt/v4","fromFixed":"4.5.1","toFixed":"4.5.2","daysApart":137},{"kind":"same-code","provenance":"machine","files":["parser.go"],"commits":["https://github.com/golang-jwt/jwt/commit/7b1c1c00a171c6c79bbdb40e4ce7d197060c1c2c","https://github.com/golang-jwt/jwt/commit/0951d184286dece21f73c85673fd308786ffe9c3","https://github.com/golang-jwt/jwt/commit/bf316c48137a1212f8d0af9288cc9ce8e59f1afb"],"basis":"shared function","functions":["ParseWithClaims"]}]}],"packageHistory":[{"cve":"CVE-2024-51744","published":"2024-11-04","fixed":"4.5.1","kev":false},{"cve":"CVE-2025-30204","published":"2025-03-21","fixed":"4.5.2","kev":false}],"package":"Go:github.com/golang-jwt/jwt/v4"}}