CVE-2020-14040
HIGH 7.5CVSS 3.1golang.org/x/text Infinite loop
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.
- Published
- 17 Jun 2020
- Last modified
- 10 Sep 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-400CWE-835
- Also known as
- GHSA-5rcv-m4m3-hfh7GO-2020-0015
- Sources
- NVDJSONOSV GHSA-5rcv-m4m3-hfh7JSONOSV GO-2020-0015JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | 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 | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | golang | textcpe:2.3:a:golang:text:*:*:*:*:*:*:*:* |
< 0.3.3 | 0.3.3 |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:* |
= 32 | |
| OSV | Go | golang.org/x/text | < 0.3.3 | 0.3.3 |
References
- https://groups.google.com/forum/#%21topic/golang-announce/bXVeAmGOqz0
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TACQFZDPA7AUR6TRZBCX2RGRFSDYLI7O/
- 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 · WEB, FIX
- https://go.dev/issue/39491 · WEB, REPORT
- https://go.googlesource.com/text/+/23ae387dee1f90d29a23c0e87ee0b46038fbed0e · WEB, FIX
- 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
History
- 25 Nov 2026 20:31 UTC · NVD: first stored (published 17 Jun 2020)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 14 Apr 2021)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 18 May 2021)