{"id":"GHSA-mh63-6h87-95cp","revision":"329b39022a87438398363318e6c21304","records":[{"revision":"329b39022a87438398363318e6c21304","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-mh63-6h87-95cp","aliases":["CVE-2025-30204","GO-2025-3553"],"title":"jwt-go allows excessive memory allocation during header parsing","description":"### Summary\n\nFunction [`parse.ParseUnverified`](https://github.com/golang-jwt/jwt/blob/c035977d9e11c351f4c05dfeae193923cbab49ee/parser.go#L138-L139) currently splits (via a call to [strings.Split](https://pkg.go.dev/strings#Split)) its argument (which is untrusted data) on periods.\n\nAs 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. Relevant weakness: [CWE-405: Asymmetric Resource Consumption (Amplification)](https://cwe.mitre.org/data/definitions/405.html)\n\n### Details\n\nSee [`parse.ParseUnverified`](https://github.com/golang-jwt/jwt/blob/c035977d9e11c351f4c05dfeae193923cbab49ee/parser.go#L138-L139) \n\n### Impact\n\nExcessive memory allocation","state":0,"publishedAt":"2025-03-21T22:04:00+00:00","modifiedAt":"2026-09-10T03:50:56.8016465+00:00","affected":[{"ecosystem":"Go","name":"github.com/golang-jwt/jwt/v5","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"5.0.0-rc.1"},{"kind":"fixed","version":"5.2.2"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/golang-jwt/jwt/v4","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"4.5.2"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/golang-jwt/jwt","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"3.2.0"},{"kind":"last_affected","version":"3.2.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":null,"severity":null},{"system":"CVSS_V4","vector":"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","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/golang-jwt/jwt/security/advisories/GHSA-mh63-6h87-95cp","https://nvd.nist.gov/vuln/detail/CVE-2025-30204","https://github.com/golang-jwt/jwt/commit/0951d184286dece21f73c85673fd308786ffe9c3","https://github.com/golang-jwt/jwt/commit/bf316c48137a1212f8d0af9288cc9ce8e59f1afb","https://github.com/golang-jwt/jwt","https://security.netapp.com/advisory/ntap-20250404-0002"],"sourceUrl":"https://github.com/advisories/GHSA-mh63-6h87-95cp","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-mh63-6h87-95cp","identifiers":["GHSA-mh63-6h87-95cp","CVE-2025-30204","GO-2025-3553"]},"retained":false,"historicalAffected":[]}],"coverage":[]}