CVE-2020-14040 is a high-severity (CVSS 7.5) CWE-835 vulnerability in golang.org/x/text. A fix is available for golang.org/x/text — see the affected versions and patch details below.
golang.org/x/text Infinite loop
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
CVE-2020-14040 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 378,567 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
golang.org/x/textReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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.
Specific Go Packages Affected
golang.org/x/text/encoding/unicode golang.org/x/text/transform
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | golang.org/x/text | all versions | 0.3.3go get golang.org/x/text@v0.3.3 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for golang.org/x/text, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update golang.org/x/text to 0.3.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2020-14040 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2020-14040 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2020-14040. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
* OpenShift ServiceMesh (OSSM) 1.0 is Out Of Support Scope (OOSS) for Moderate and Low impact vulnerabilities. Jaeger was packaged with ServiceMesh in 1.0, and hence is also marked OOSS, but the Jaeger-Operator is a standalone product and is affected by this vulnerability. * Because Service Telemetry Framework does…
| Product | Fixed in | Advisory |
|---|---|---|
| 3scale API Management 2.10 on RHEL 7 | 3scale-amp2/3scale-rhel7-operator:1.13.0-17 | RHSA-2021:1129 |
| Jaeger-1.17 | distributed-tracing/jaeger-agent-rhel7:1.17.5-3 | RHSA-2020:3087 |
| Openshift Serveless 1.11 | openshift-serverless-1/client-kn-rhel8:0.17.3-2 | RHSA-2020:5149 |
| OpenShift Service Mesh 1.0 | openshift-service-mesh/3scale-istio-adapter-rhel8:1.0.0-8 | RHSA-2020:3372 |
| Openshift Service Mesh 1.1 | kiali-0:v1.12.10.redhat2-1.el7 | RHSA-2020:3369 |
| Red Hat Advanced Cluster Management for Kubernetes 2.1 for RHEL 8 | rhacm2/acm-must-gather-rhel8:v2.1.3-5 | RHSA-2021:0980 |
| Red Hat Advanced Cluster Management for Kubernetes 2.1 for RHEL 8 | rhacm2/acm-must-gather-rhel8:v2.1.6-6 | RHSA-2021:1369 |
| Red Hat Developer Tools | go-toolset-1.13-0:1.13.15-1.el7 | RHSA-2020:4214 |
Frequently Asked Questions
Is CVE-2020-14040 in your dependencies?
O3 Security finds CVE-2020-14040 across Go dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.