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

- Severity: High 7.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.89%, higher than 80% of CVEs (2026-12-01)
- Published: 2020-06-17T19:22:31.000Z
- Modified: 2026-09-10T03:49:04.603Z
- Also known as: GHSA-5rcv-m4m3-hfh7, GO-2020-0015
- Related: CGA-36h4-wcvc-55j4
- Weaknesses: CWE-400, CWE-835
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- golang.org/x/text (Go): before 0.3.3
- golang text: before 0.3.3
- fedoraproject fedora: 32

## Every score

- GitHub: CVSS:3.1 7.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:P/RL:O/RC:C`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:N/A:P`

## References

- <https://groups.google.com/forum/#%21topic/golang-announce/bXVeAmGOqz0>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TACQFZDPA7AUR6TRZBCX2RGRFSDYLI7O/> (vendor-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2020-14040> (advisory)
- <https://github.com/golang/go/issues/39491> (web)
- <https://github.com/golang/text/commit/23ae387dee1f90d29a23c0e87ee0b46038fbed0e> (web)
- <https://go-review.googlesource.com/c/text/+/238238> (web)
- <https://go.dev/cl/238238> (fix, web)
- <https://go.dev/issue/39491> (report, web)
- <https://go.googlesource.com/text/+/23ae387dee1f90d29a23c0e87ee0b46038fbed0e> (fix, web)
- <https://groups.google.com/forum/#!topic/golang-announce/bXVeAmGOqz0> (web)
- <https://groups.google.com/g/golang-announce/c/bXVeAmGOqz0> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TACQFZDPA7AUR6TRZBCX2RGRFSDYLI7O> (web)

## Sources

- CVE List: [CVE-2020-14040](https://www.cve.org/CVERecord?id=CVE-2020-14040), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-5rcv-m4m3-hfh7](https://github.com/advisories/GHSA-5rcv-m4m3-hfh7), CC-BY-4.0, modified 2026-09-10
- Go Vulnerability Database: [GO-2020-0015](https://pkg.go.dev/vuln/GO-2020-0015), CC-BY-4.0, modified 2026-02-04
- NVD: [CVE-2020-14040](https://nvd.nist.gov/vuln/detail/CVE-2020-14040), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2020-14040 · Whole record: https://cve.day/CVE-2020-14040.json · Rebuilt by cve.day 2026-11-25T22:57:53.005Z
