Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulnerability in golang.org/x/text v0.3.0 #598

Closed
alanbernstein opened this issue Mar 3, 2022 · 2 comments · Fixed by #599
Closed

Vulnerability in golang.org/x/text v0.3.0 #598

alanbernstein opened this issue Mar 3, 2022 · 2 comments · Fixed by #599
Assignees

Comments

@alanbernstein
Copy link

alanbernstein commented Mar 3, 2022

From https://nvd.nist.gov/vuln/detail/CVE-2020-14040:

The x/text package before 0.3.3 for Go has a vulnerability in encoding/unicode that could lead to the UTF-16 decoder entering an infinite loop, causing the program to crash or run out of memory. An attacker could provide a single byte to a UTF16 decoder instantiated with UseBOM or ExpectBOM to trigger an infinite loop if the String function on the Decoder is called, or the Decoder is passed to golang.org/x/text/transform.String.

While trying to resolve this in my own project, I found that jwx requires this vulnerable version of golang.org/x/text. Can this dependency be updated to a newer version here? I started working on a branch, but I'm not actually sure how to pin a transitive dependency.

It looks like there is a similar issue with the golang.org/x/crypto package: https://nvd.nist.gov/vuln/detail/CVE-2020-29652. This requires v0.0.0-20201203163018-be400aefbc4c or later.

@lestrrat
Copy link
Collaborator

lestrrat commented Mar 3, 2022

Seems like it's golang.org/x/crypto

% go mod graph | grep text
golang.org/x/net@v0.0.0-20190404232315-eb5bcb51f2a3 golang.org/x/text@v0.3.0

EDIT: I realize I posted about golang.org/x/net above, but it boils down to golang.og/x/crypto. Sorry for the confusion

@lestrrat
Copy link
Collaborator

lestrrat commented Mar 3, 2022

@alanbernstein Thanks for the heads up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants