An open API service providing security vulnerability metadata for many open source software ecosystems.

GSA_kwCzR0hTQS1taDYzLTZoODctOTVjcM4ABFxr

High CVSS: 8.7 EPSS: 0.00033% (0.0767 Percentile) EPSS:

jwt-go allows excessive memory allocation during header parsing

Affected Packages Affected Versions Fixed Versions
go:github.com/golang-jwt/jwt >= 3.2.0, <= 3.2.2 No known fixed version
10,254 Dependent packages
15,408 Dependent repositories

Affected Version Ranges

All affected versions

3.2.0, 3.2.1, 3.2.2

go:github.com/golang-jwt/jwt/v4 < 4.5.2 4.5.2
15,582 Dependent packages
22,852 Dependent repositories

Affected Version Ranges

All affected versions

4.0.0, 4.1.0, 4.2.0, 4.3.0, 4.4.0, 4.4.1, 4.4.2, 4.4.3, 4.5.0, 4.5.1

All unaffected versions

4.5.2

go:github.com/golang-jwt/jwt/v5 >= 5.0.0-rc.1, < 5.2.2 5.2.2
4,040 Dependent packages
387 Dependent repositories

Affected Version Ranges

All affected versions

5.0.0, 5.0.0-rc.1, 5.0.0-rc.2, 5.1.0, 5.2.0, 5.2.1

All unaffected versions

5.2.2, 5.2.3

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

See parse.ParseUnverified

Impact

Excessive memory allocation

References: