github.com/golang-jwt/jwt/v5
Affected
- introduced
5.0.0-rc.1, fixed5.2.2(semver)
Fixed versions
5.2.2
Fix
- Fixed version
5.2.2go get github.com/golang-jwt/jwt/[email protected]
Advisory
Also known as: CVE-2025-30204, GO-2025-3553
jwt-go allows excessive memory allocation during header parsing
Summary
Function `parse.ParseUnverified` currently 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. Relevant weakness: CWE-405: Asymmetric Resource Consumption (Amplification)
Details
Impact
Excessive memory allocation
High Basis: The source's own band: HIGH
5.0.0-rc.1, fixed 5.2.2 (semver)5.2.2
5.2.2go get github.com/golang-jwt/jwt/[email protected]0, fixed 4.5.2 (semver)4.5.2
4.5.2go get github.com/golang-jwt/jwt/[email protected]3.2.0, last affected 3.2.2 (semver)None listed
No fixed version is listed.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0