Vulnerability GHSA-69ch-w2m2-3vjp

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.
3 years ago
October 14, 2022 at 07:00 PM UTC
golang.org/x/text/language Denial of service via crafted Accept-Language header
v0.1.0 - v0.3.7
v0.1.0 - v0.3.7

Summary

golang.org/x/text/language Denial of service via crafted Accept-Language header

Details

The BCP 47 tag parser has quadratic time complexity due to inherent aspects of its design. Since the parser is, by design, exposed to untrusted user input, this can be leveraged to force a program to consume significant time parsing Accept-Language headers. The parser cannot be easily rewritten to fix this behavior for various reasons. Instead the solution implemented in this CL is to limit the total complexity of tags passed into ParseAcceptLanguage by limiting the number of dashes in the string to 1000. This should be more than enough for the majority of real world use cases, where the number of tags being sent is likely to be in the single digits.

Specific Go Packages Affected

golang.org/x/text/language

Impacted packages

Timeline

Published
3 years ago
October 14, 2022 at 07:00 PM UTC
Last Modified
27 days ago
September 10, 2026 at 03:49 AM UTC