Security mailing lists by PureSourceCode

CVE-2025-30204

HIGH 7.5CVSS 3.1

jwt-go allows excessive memory allocation during header parsing

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
21 Mar 2025
Last modified
23 Nov 2026
Assigned by
security-advisories@github.com
NVD status
Deferred
Weakness
CWE-405
Also known as
GHSA-mh63-6h87-95cpGO-2025-3553
Sources
NVDJSONOSV GHSA-mh63-6h87-95cpJSONOSV GO-2025-3553JSON

Scores

SourceScored byVersionScoreVector / decision
OSV GitHub CVSS 4.0 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
NVD security-advisories@github.com (Secondary) CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
OSV GitHub CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV Go github.com/golang-jwt/jwt/v5 >= 5.0.0-rc.1, < 5.2.2 5.2.2
OSV Go github.com/golang-jwt/jwt/v4 < 4.5.2 4.5.2
OSV Go github.com/golang-jwt/jwt >= 3.2.0, <= 3.2.2
OSV Go github.com/golang-jwt/jwt all versions

References

History

  • 25 Nov 2026 20:57 UTC · NVD: first stored (published 21 Mar 2025)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 26 Mar 2025)
  • 25 Nov 2026 20:13 UTC · OSV: first stored (published 21 Mar 2025)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.