Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-16845

CVE-2020-16845: Golang Go DOS Vulnerability

CVE-2020-16845 is a denial of service flaw in Golang Go that triggers infinite read loops in ReadUvarint and ReadVarint functions. This article covers the technical details, affected versions, and mitigation steps.

Published: March 4, 2026

CVE-2020-16845 Overview

CVE-2020-16845 is a denial of service vulnerability affecting the Go programming language runtime. The flaw exists in the encoding/binary package, specifically in the ReadUvarint and ReadVarint functions, which can enter an infinite read loop when processing specially crafted invalid inputs. This vulnerability allows remote attackers to cause resource exhaustion and denial of service conditions in applications that process untrusted binary data using these functions.

Critical Impact

Applications using Go's encoding/binary package to parse untrusted input are vulnerable to denial of service attacks through infinite loop conditions, potentially causing complete service unavailability.

Affected Products

  • Golang Go versions before 1.13.15
  • Golang Go 1.14.x versions before 1.14.7
  • openSUSE Leap 15.1 and 15.2
  • Debian Linux 9.0 and 10.0
  • Fedora 31 and 32

Discovery Timeline

  • August 6, 2020 - CVE-2020-16845 published to NVD
  • November 21, 2024 - Last updated in NVD database

Technical Details for CVE-2020-16845

Vulnerability Analysis

The vulnerability resides in the Go standard library's encoding/binary package, which provides functions for reading and writing binary data. The ReadUvarint and ReadVarint functions are designed to read variable-length integers from an io.ByteReader interface. These functions implement a loop that continues reading bytes until a termination condition is met, specifically when a byte with its most significant bit (MSB) unset is encountered.

The root cause is insufficient validation of input data during the variable-length integer decoding process. When malformed input is provided—specifically input that never satisfies the termination condition—the functions enter an infinite loop, continuously attempting to read additional bytes. This behavior causes the affected goroutine to consume CPU resources indefinitely, leading to denial of service.

Variable-length integers (varints) are commonly used in protocol buffers, binary serialization formats, and network protocols. Any Go application that uses binary.ReadUvarint() or binary.ReadVarint() to parse data from untrusted sources is potentially vulnerable to this attack.

Root Cause

The vulnerability is classified under CWE-835 (Loop with Unreachable Exit Condition). The ReadUvarint and ReadVarint functions lack proper bounds checking on the number of bytes read during variable-length integer decoding. When processing a maliciously crafted byte sequence where every byte has its continuation bit set (MSB = 1), the loop never reaches its exit condition, resulting in infinite execution.

Attack Vector

An attacker can exploit this vulnerability remotely by sending specially crafted binary data to any Go application that processes variable-length integers from untrusted input. The attack requires network access to the vulnerable application and involves sending a sequence of bytes where each byte has the most significant bit set, preventing the loop from terminating. This is particularly impactful for services that:

  • Process Protocol Buffers or similar serialization formats
  • Handle binary network protocols
  • Parse user-uploaded binary files
  • Implement custom binary data formats

The exploitation is straightforward, requiring only the ability to send malformed binary data to the target application. No authentication or special privileges are required, making this a significant concern for internet-facing services built with vulnerable Go versions.

Detection Methods for CVE-2020-16845

Indicators of Compromise

  • Abnormally high CPU utilization in Go-based services without corresponding increase in legitimate traffic
  • Goroutines stuck in extended execution states within encoding/binary package functions
  • Memory patterns showing repeated read operations on the same input stream
  • Service degradation or timeouts in applications processing binary data

Detection Strategies

  • Monitor Go application CPU usage patterns for sustained spikes that correlate with binary data processing
  • Implement application-level logging for encoding/binary function calls with timing metrics
  • Deploy runtime monitoring to detect goroutines that exceed expected execution thresholds
  • Use Go's built-in profiling tools (pprof) to identify infinite loop patterns in production

Monitoring Recommendations

  • Configure alerts for sustained CPU utilization above baseline thresholds in Go services
  • Implement request timeout enforcement at the application and infrastructure levels
  • Monitor goroutine counts and execution times using observability tooling
  • Review application logs for patterns indicating repeated parsing failures on binary input

How to Mitigate CVE-2020-16845

Immediate Actions Required

  • Upgrade Go runtime to version 1.13.15 or later for 1.13.x branch
  • Upgrade Go runtime to version 1.14.7 or later for 1.14.x branch
  • Recompile all Go applications with the patched Go runtime versions
  • Implement input validation and size limits for binary data processing
  • Deploy request timeouts and circuit breakers for services handling binary input

Patch Information

The Go team addressed this vulnerability in Go versions 1.13.15 and 1.14.7, released in August 2020. The fix adds proper bounds checking to the ReadUvarint and ReadVarint functions to prevent infinite loop conditions. Organizations should update their Go toolchain and recompile all affected applications.

Security advisories and patches have been issued by multiple distribution maintainers:

  • Debian Security Advisory DSA-4848
  • NetApp Security Advisory
  • Oracle CPU April 2021

Workarounds

  • Implement input size limits and validation before passing data to ReadUvarint or ReadVarint
  • Use custom wrapper functions that enforce maximum byte counts during varint decoding
  • Deploy request timeouts at the HTTP/network layer to terminate long-running operations
  • Consider using alternative parsing libraries with built-in bounds checking until patching is complete
bash
# Check current Go version
go version

# Upgrade Go to patched version (example for Linux)
# Download Go 1.14.7 or later from https://golang.org/dl/
wget https://golang.org/dl/go1.14.7.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.14.7.linux-amd64.tar.gz

# Rebuild affected applications
cd /path/to/your/app
go build -a

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.19%

  • 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
  • openSUSE Security Announcement

  • openSUSE Security Announcement

  • openSUSE Security Announcement

  • openSUSE Security Announcement

  • Go Language Announcement

  • Go Language Announcement

  • Debian LTS Security Announcement

  • Debian LTS Security Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • NetApp Security Advisory

  • Debian Security Advisory DSA-4848

  • Oracle Security Alert CPU April 2021
  • 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