You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
x/text/language: ParseAcceptLanguage takes a long time to parse complex tags #56152
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.
changed the title [-]security: fix CVE-2022-32149[/-][+]x/text/language: ParseAcceptLanguage takes a long time to parse complex tags[/+]on Oct 11, 2022
This was fixed in the golang.org/x/text repository. It's not in any particular Go release. I think the first revision of golang.org/x/text with the fix is v0.4.0.
yes, it is fixed in golang.org/x/text repository, and it is not in any particular Go release. but there is reference relationship between the go version and x/text version.
when i run go mod graph in the src of go(any version), i can see the dependencies like this
go mod graph | grep text
std golang.org/x/text@v0.11.0
golang.org/x/crypto@v0.11.1-0.20230711161743-2e82bdd1719d golang.org/x/text@v0.11.0
golang.org/x/net@v0.12.1-0.20231027154334-5ca955b1789c golang.org/x/text@v0.11.0
golang.org/x/text@v0.11.0 golang.org/x/tools@v0.6.0
golang.org/x/text@v0.11.0 golang.org/x/mod@v0.8.0
golang.org/x/text@v0.11.0 golang.org/x/sys@v0.5.0
the text version was referred in the source code, i think. even if i upgrade the version of the x/text, how can i handle this part?
Activity
gopherbot commentedon Oct 11, 2022
Change https://go.dev/cl/442235 mentions this issue:
language: reject excessively large Accept-Language strings[-]security: fix CVE-2022-32149[/-][+]x/text/language: ParseAcceptLanguage takes a long time to parse complex tags[/+][deps] go get golang.org/x/text && go mod tidy
[deps] go get golang.org/x/text && go mod tidy (#11466)
[deps] go get golang.org/x/text && go mod tidy
[deps] go get golang.org/x/text && go mod tidy (#11467)
Require `golang.org/x/text` >= v0.3.8
upgrade golang.org/x/text module
upgrade golang.org/x/text module (#455)
Upgrade golang.org/x/text to 0.3.8
Upgrade golang.org/x/text to 0.3.8 (#382)
fixed CVE-2022-32149
maariitsme commentedon Jul 24, 2023
Hi Team
@rolandshoemaker @gopherbot @dmitshur @evanphx
It is patched in which golang version?
ianlancetaylor commentedon Jul 25, 2023
This was fixed in the golang.org/x/text repository. It's not in any particular Go release. I think the first revision of golang.org/x/text with the fix is v0.4.0.
Upgrade golang.org/x/text to 0.3.8 (envoyproxy#382)
Upgrade golang.org/x/text to 0.3.8 (envoyproxy#382)
language: reject excessively large Accept-Language strings
ChrisZhangJin commentedon Apr 3, 2024
yes, it is fixed in golang.org/x/text repository, and it is not in any particular Go release. but there is reference relationship between the go version and x/text version.
when i run go mod graph in the src of go(any version), i can see the dependencies like this
the text version was referred in the source code, i think. even if i upgrade the version of the x/text, how can i handle this part?
neild commentedon Apr 3, 2024
Nothing in the Go standard library uses this function, so no versions of Go itself are affected.