{"id":"CVE-2025-30204","aliases":["CVE-2025-30204","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"],"kind":"vulnerability","state":"published","title":"jwt-go allows excessive memory allocation during header parsing","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"### 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","format":"markdown","source":"ghsa"},{"lang":"en","text":"Excessive memory allocation during header parsing in github.com/golang-jwt/jwt","format":"markdown","source":"go"},{"lang":"es","text":"golang-jwt es una implementación de Go de tokens web JSON. En versiones anteriores a la 5.2.2 y la 4.5.2, la función parse.ParseUnverified divide (mediante una llamada a strings.Split) su argumento (que contiene datos no confiables) en puntos. Como resultado, ante una solicitud maliciosa cuyo encabezado de autorización consiste en \"Bearer\" seguido de muchos puntos, una llamada a dicha función genera asignaciones de O(n) bytes (donde n representa la longitud del argumento de la función), con un factor constante de aproximadamente 16. Este problema se solucionó en las versiones 5.2.2 y 4.5.2.","source":"nvd"}],"published":"2025-03-21T21:42:01.382Z","modified":"2026-11-23T21:12:29.361Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","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"}],"cwes":["CWE-405"],"affected":[{"ranges":[{"version":">= 3.2.0, < 4.5.2","status":"affected"},{"version":">= 5.0.0-rc.1, < 5.2.2","status":"affected"}],"vendor":"golang-jwt","product":"jwt","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"5.0.0-rc.1","status":"affected","fixed":"5.2.2"}],"ecosystem":"Go","package":"github.com/golang-jwt/jwt/v5","purl":"pkg:golang/github.com/golang-jwt/jwt/v5","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.5.2"}],"ecosystem":"Go","package":"github.com/golang-jwt/jwt/v4","purl":"pkg:golang/github.com/golang-jwt/jwt/v4","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.2.0","status":"affected","lastAffected":"3.2.2"}],"ecosystem":"Go","package":"github.com/golang-jwt/jwt","purl":"pkg:golang/github.com/golang-jwt/jwt","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/golang-jwt/jwt","purl":"pkg:golang/github.com/golang-jwt/jwt","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.5.2"}],"ecosystem":"Go","package":"github.com/golang-jwt/jwt/v4","purl":"pkg:golang/github.com/golang-jwt/jwt/v4","source":"go"},{"ranges":[{"type":"semver","introduced":"5.0.0-rc.1","status":"affected","fixed":"5.2.2"}],"ecosystem":"Go","package":"github.com/golang-jwt/jwt/v5","purl":"pkg:golang/github.com/golang-jwt/jwt/v5","source":"go"}],"references":[{"url":"https://github.com/golang-jwt/jwt/security/advisories/GHSA-mh63-6h87-95cp","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/golang-jwt/jwt/commit/0951d184286dece21f73c85673fd308786ffe9c3","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/golang-jwt/jwt/commit/bf316c48137a1212f8d0af9288cc9ce8e59f1afb","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://security.netapp.com/advisory/ntap-20250404-0002/","tags":[],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-30204","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/golang-jwt/jwt","tags":["package"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20250404-0002","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2025-03-24T14:10:18.281Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-30204","url":"https://www.cve.org/CVERecord?id=CVE-2025-30204","licence":"CVE Terms of Use","modified":"2025-04-10T13:03:19.897Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mh63-6h87-95cp","url":"https://github.com/advisories/GHSA-mh63-6h87-95cp","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:56.801Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2025-3553","url":"https://pkg.go.dev/vuln/GO-2025-3553","licence":"CC-BY-4.0","modified":"2026-11-23T21:12:29.361Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-30204","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-30204","licence":"Public domain","modified":"2026-06-17T09:08:21.100Z"}],"updatedAt":"2026-11-25T22:58:55.415Z","epss":{"score":0.00811,"percentile":0.58105,"date":"2026-12-01T12:00:22.000Z"}}