{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-30204","id":"CVE-2025-30204","title":"jwt-go allows excessive memory allocation during header parsing","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 inc","descriptionLong":"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":"2025-03-21T21:42:01.382Z","updated":"2026-10-28T17:27:15.862214472Z","reserved":"2025-03-18T18:15:13.849Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub_M"},"metrics":[{"version":"4.0","score":null,"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","rating":"high","source":"GitHub"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub_M"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"github.com"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub"}],"rating":"high","products":["golang-jwt jwt"],"affectedProducts":[{"vendor":"golang-jwt","product":"jwt","defaultStatus":null,"versions":[{"version":">= 3.2.0, < 4.5.2","status":"affected"},{"version":">= 5.0.0-rc.1, < 5.2.2","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"Go","name":"github.com/golang-jwt/jwt/v5","purl":"pkg:golang/github.com/golang-jwt/jwt/v5","ranges":[">=5.0.0-rc.1 <5.2.2"],"fixed":["5.2.2"],"advisory":"GHSA-mh63-6h87-95cp"},{"ecosystem":"Go","name":"github.com/golang-jwt/jwt/v4","purl":"pkg:golang/github.com/golang-jwt/jwt/v4","ranges":["<4.5.2"],"fixed":["4.5.2"],"advisory":"GHSA-mh63-6h87-95cp"},{"ecosystem":"Go","name":"github.com/golang-jwt/jwt","purl":"pkg:golang/github.com/golang-jwt/jwt","ranges":[">=3.2.0 <=3.2.2","all versions"],"fixed":[],"advisory":"GHSA-mh63-6h87-95cp"}],"cwes":["CWE-405"],"aliases":["GHSA-mh63-6h87-95cp","GO-2025-3553"],"references":[{"url":"https://github.com/golang-jwt/jwt/security/advisories/GHSA-mh63-6h87-95cp","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/golang-jwt/jwt/commit/0951d184286dece21f73c85673fd308786ffe9c3","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/golang-jwt/jwt/commit/bf316c48137a1212f8d0af9288cc9ce8e59f1afb","tags":["x_refsource_MISC","fix","web"]},{"url":"https://security.netapp.com/advisory/ntap-20250404-0002/","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/30xxx/CVE-2025-30204.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-30204","tags":["advisory"]},{"url":"https://github.com/golang-jwt/jwt","tags":["package"]},{"url":"https://security.netapp.com/advisory/ntap-20250404-0002","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial"},"epss":0.00811,"epssPercentile":0.57716,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-30204","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-30204","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-30204","ok":true,"note":"3 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-mh63-6h87-95cp","ok":true,"note":"GHSA-mh63-6h87-95cp"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-30204","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":["go"],"critical":[],"attention":null}