{"id":"CVE-2020-14040","aliases":["CVE-2020-14040","GHSA-5rcv-m4m3-hfh7","GO-2020-0015"],"related":["CGA-36h4-wcvc-55j4"],"kind":"vulnerability","state":"published","title":"golang.org/x/text Infinite loop","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"Go version v0.3.3 of the x/text package fixes 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.\n\n### Specific Go Packages Affected\ngolang.org/x/text/encoding/unicode\ngolang.org/x/text/transform","format":"markdown","source":"ghsa"},{"lang":"en","text":"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 transform.String. If used to parse user supplied input, this may be used as a denial of service vector.","format":"markdown","source":"go"},{"lang":"es","text":"El paquete x/text anterior a la versión 0.3.3 para Go tiene una vulnerabilidad en la codificación/unicode que podría llevar al decodificador UTF-16 a ingresar en un bucle infinito, causando que el programa se bloquee o se ejecute fuera de la memoria. Un atacante podría proporcionar un solo byte a un decodificador UTF16 instanciado con UseBOM o ExpectBOM para activar un bucle infinito si se llama a la función String en el Decoder, o el Decoder es pasado a golang.org/x/text/transform.String","source":"nvd"}],"published":"2020-06-17T19:22:31.000Z","modified":"2026-09-10T03:49:04.603Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"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","score":7.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","score":5,"rating":"MEDIUM"}],"cwes":["CWE-400","CWE-835"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.3.3"}],"ecosystem":"Go","package":"golang.org/x/text","purl":"pkg:golang/golang.org/x/text","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.3.3"}],"ecosystem":"Go","package":"golang.org/x/text","purl":"pkg:golang/golang.org/x/text","source":"go"},{"ranges":[{"status":"affected","fixed":"0.3.3"}],"vendor":"golang","product":"text","cpe":"cpe:2.3:a:golang:text:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"32"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://groups.google.com/forum/#%21topic/golang-announce/bXVeAmGOqz0","tags":["x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TACQFZDPA7AUR6TRZBCX2RGRFSDYLI7O/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-14040","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/golang/go/issues/39491","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/golang/text/commit/23ae387dee1f90d29a23c0e87ee0b46038fbed0e","tags":["web"],"sources":["ghsa"]},{"url":"https://go-review.googlesource.com/c/text/+/238238","tags":["web"],"sources":["ghsa"]},{"url":"https://go.dev/cl/238238","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://go.dev/issue/39491","tags":["report","web"],"sources":["ghsa","go"]},{"url":"https://go.googlesource.com/text/+/23ae387dee1f90d29a23c0e87ee0b46038fbed0e","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://groups.google.com/forum/#!topic/golang-announce/bXVeAmGOqz0","tags":["web"],"sources":["ghsa"]},{"url":"https://groups.google.com/g/golang-announce/c/bXVeAmGOqz0","tags":["web"],"sources":["ghsa","go"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TACQFZDPA7AUR6TRZBCX2RGRFSDYLI7O","tags":["web"],"sources":["ghsa"]}],"credits":["@abacabadabacaba","Anton Gyllenberg"],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-14040","url":"https://www.cve.org/CVERecord?id=CVE-2020-14040","licence":"CVE Terms of Use","modified":"2024-08-04T12:32:14.681Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5rcv-m4m3-hfh7","url":"https://github.com/advisories/GHSA-5rcv-m4m3-hfh7","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:04.603Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2020-0015","url":"https://pkg.go.dev/vuln/GO-2020-0015","licence":"CC-BY-4.0","modified":"2026-02-04T03:02:32.031Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-14040","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-14040","licence":"Public domain","modified":"2026-06-17T02:54:08.710Z"}],"updatedAt":"2026-11-25T22:57:53.005Z","epss":{"score":0.01886,"percentile":0.80121,"date":"2026-12-01T12:00:22.000Z"}}