The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2020-14040

CVE-2020-14040: Golang Text UTF-16 DOS Vulnerability

CVE-2020-14040 is a denial of service flaw in the Golang x/text package affecting UTF-16 decoding that causes infinite loops and memory exhaustion. This article covers technical details, affected versions, and mitigation.

Published: March 4, 2026

CVE-2020-14040 Overview

CVE-2020-14040 is a denial of service vulnerability in the Go x/text package affecting versions prior to 0.3.3. The vulnerability exists in the encoding/unicode module where the UTF-16 decoder can enter an infinite loop when processing maliciously crafted input, leading to program crashes or memory exhaustion.

An attacker can exploit this vulnerability by providing a single byte to a UTF-16 decoder instantiated with UseBOM or ExpectBOM. When the String function on the Decoder is called, or when the Decoder is passed to golang.org/x/text/transform.String, the infinite loop condition is triggered.

Critical Impact

This vulnerability allows remote attackers to cause denial of service conditions by triggering an infinite loop in Go applications using the vulnerable x/text package, potentially leading to application crashes or resource exhaustion.

Affected Products

  • Golang Text (versions before 0.3.3)
  • Fedora 32

Discovery Timeline

  • 2020-06-17 - CVE-2020-14040 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2020-14040

Vulnerability Analysis

This vulnerability (CWE-835: Loop with Unreachable Exit Condition) affects the UTF-16 decoder implementation in the Go x/text package. The issue manifests when the decoder is configured with byte order mark (BOM) handling modes (UseBOM or ExpectBOM) and receives insufficient input data.

When a single byte is passed to the decoder under these configurations, the internal state machine fails to properly handle the incomplete input, resulting in the decoder continuously attempting to process the same byte without advancing or terminating. This creates an infinite loop condition that consumes CPU resources indefinitely.

The vulnerability is particularly dangerous because it can be triggered remotely through any network-accessible application that processes user-supplied text through the vulnerable decoder. Applications performing text encoding transformations on untrusted input are at risk.

Root Cause

The root cause lies in improper boundary checking within the UTF-16 decoder's BOM handling logic. When the decoder expects a byte order mark but receives only a single byte of input, it enters a state where it cannot proceed forward (insufficient data to determine BOM) but also cannot exit gracefully. The decoder's loop condition fails to account for this edge case, causing an unreachable exit condition.

The transform.String function and the Decoder.String method both rely on the underlying decoder's ability to properly signal completion or error states. With the vulnerable code, neither condition is signaled, resulting in infinite iteration.

Attack Vector

The attack vector for CVE-2020-14040 is network-based, requiring no authentication or user interaction. An attacker can craft a malicious payload containing a single byte and send it to any application endpoint that processes text through the vulnerable UTF-16 decoder.

The vulnerability can be exploited by sending specially crafted input to a target application that uses the golang.org/x/text/encoding/unicode package with UseBOM or ExpectBOM configuration. When the application attempts to decode this input using the String function or passes the decoder to transform.String, the infinite loop is triggered.

Applications that accept user-controlled text input for encoding transformation, internationalization processing, or character set conversion are potential targets. The attack requires minimal bandwidth and can be launched with a single malicious request.

Detection Methods for CVE-2020-14040

Indicators of Compromise

  • Go applications experiencing sudden CPU spikes at 100% utilization on affected processes
  • Application threads or goroutines stuck in encoding/decoding operations without completing
  • Memory consumption steadily increasing in processes handling text transformation
  • Application unresponsiveness or timeout errors during text processing operations

Detection Strategies

  • Monitor application dependencies for golang.org/x/text package versions below 0.3.3
  • Implement runtime monitoring for goroutines with abnormally long execution times in text processing functions
  • Use static code analysis tools to identify usage of UseBOM or ExpectBOM decoder configurations
  • Deploy application performance monitoring (APM) to detect infinite loop patterns in production environments

Monitoring Recommendations

  • Set up alerting for sustained high CPU usage in Go applications handling text encoding
  • Monitor for process restarts or OOM (out of memory) kills related to text processing services
  • Implement request timeout mechanisms to detect and terminate stuck encoding operations
  • Log and analyze text processing failures that may indicate exploitation attempts

How to Mitigate CVE-2020-14040

Immediate Actions Required

  • Upgrade golang.org/x/text package to version 0.3.3 or later immediately
  • Audit all Go applications for usage of the vulnerable encoding/unicode decoder
  • Implement input validation to reject suspiciously small payloads destined for UTF-16 decoding
  • Deploy request timeouts around text transformation operations as a defense-in-depth measure

Patch Information

The Go team has addressed this vulnerability in golang.org/x/text version 0.3.3. Organizations should update their Go module dependencies to include the patched version. For additional information, refer to the Google Group Announcement and Fedora Package Announcement.

Workarounds

  • Avoid using UseBOM or ExpectBOM configurations with the UTF-16 decoder until patched
  • Validate that input data is at least 2 bytes before passing to UTF-16 decoders
  • Implement timeout wrappers around text transformation operations to prevent infinite loops from causing prolonged denial of service
  • Consider using alternative text encoding libraries if immediate patching is not feasible
bash
# Update Go module to patched version
go get golang.org/x/text@v0.3.3
go mod tidy

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechGolang

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-835
  • Technical References
  • Google Group Announcement

  • Fedora Package Announcement
  • Related CVEs
  • CVE-2025-47911: Go html.Parse DoS Vulnerability

  • CVE-2025-58190: Golang x/net/html DoS Vulnerability

  • CVE-2025-58187: Golang Go DOS Vulnerability

  • CVE-2025-58188: Golang Go DOS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English