Fedora Account System
Red Hat Associate
Red Hat Customer
The getPreferredLang() function in pkg/server/locales/locales.go passes the raw Accept-Language header into golang.org/x/text/language.ParseAcceptLanguage() without input validation. The upstream CVE-2022-32149 mitigation counts only '-' characters (capped at 1000) but the BCP 47 scanner aliases '_' to '-' internally after the guard check. A 1 MiB Accept-Language header using '_' separators bypasses the guard, triggering quadratic-time parsing (~1 second CPU per request on Apple M1 Pro). The affected endpoints (/login, /oauth/authorize/error) are unauthenticated. The OAuth route uses TLS passthrough (termination: passthrough), so the HAProxy ingress router operates at L4 and does not limit HTTP header sizes — Go's default MaxHeaderBytes of 1 MiB applies. Call sites: pkg/server/login/login.go:134, pkg/server/errorpage/errorpage.go:33,50,97. go.mod pins golang.org/x/text v0.29.0.