CVE-2020-14040 golang.org/x/text Infinite loop

High 7.5 Published Updated

An attacker can cause a denial of service via infinite loop in the Go x/text UTF-16 decoder when specific BOM options are enabled.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2020-14040?

CVE-2020-14040 is a high-severity denial of service vulnerability in Fedoraproject Fedora, published on 17 Jun 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-835

Which versions are affected by CVE-2020-14040?

3 open source packages ship an affected version, including golang.org/x/text. It affects 2 products.

PackageAffectedFixed in
golang.org/x/text GoAll versions0.3.3
golang.org/x/text GoAll versions0.3.3
golang.org/x/text GoAll versions0.3.3
Linux distribution packages (5)
buildah Red Hat:rhel_extras_other:7All versions0:1.11.6-12.el7_9
buildah-debuginfo Red Hat:rhel_extras_other:7All versions0:1.11.6-12.el7_9
containers-common Red Hat:rhel_extras_other:7All versions1:0.1.40-12.el7_9
skopeo Red Hat:rhel_extras_other:7All versions1:0.1.40-12.el7_9
skopeo-debuginfo Red Hat:rhel_extras_other:7All versions1:0.1.40-12.el7_9

Products include Fedoraproject Fedora, Golang Text.

How do I fix CVE-2020-14040?

Upgrade golang.org/x/text to 0.3.3 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2020-14040 being exploited?

There is no known exploitation of CVE-2020-14040 in the wild and no public exploit code.

All Fedoraproject Fedora vulnerabilities

Sources

Also known as AZL-44364, AZL-44877, DEBIAN-CVE-2020-14040, GHSA-5rcv-m4m3-hfh7, GO-2020-0015, RHSA-2020:5054 and 2 more.

Is CVE-2020-14040 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free