Vulnerability GHSA-mh63-6h87-95cp

High Risk
HIGH RISK
CVSS Score: 7.5
Score Range: 7.0–8.9
High severity vulnerabilities (CVSS 7.0–8.9). Serious vulnerabilities that should be prioritized soon after critical fixes.
1 year ago
March 21, 2025 at 10:04 PM UTC
jwt-go allows excessive memory allocation during header parsing
v3.2.0+incompatible - v3.2.2+incompatible
v3.2.0+incompatible - v3.2.2+incompatible

Summary

jwt-go allows excessive memory allocation during header parsing

Details

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

Timeline

Published
1 year ago
March 21, 2025 at 10:04 PM UTC
Fixed (v5.2.2)
1 year ago
March 21, 2025 at 08:42 PM UTC
Fixed (v4.5.2)
1 year ago
March 21, 2025 at 08:49 PM UTC
Last Modified
2 months ago
September 10, 2026 at 03:50 AM UTC