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-2021-31525

CVE-2021-31525: Golang Go net/http DOS Vulnerability

CVE-2021-31525 is a denial of service vulnerability in Golang Go net/http that allows attackers to trigger panic via large headers. This article covers the technical details, affected versions, and mitigation strategies.

Published: February 25, 2026

CVE-2021-31525 Overview

CVE-2021-31525 is a denial of service vulnerability in Go's net/http package that allows remote attackers to cause a panic by sending a large header to ReadRequest or ReadResponse functions. The vulnerability affects Go versions before 1.15.12 and 1.16.x before 1.16.4, impacting Server, Transport, and Client components in certain configurations.

Critical Impact

Remote attackers can crash Go-based HTTP servers, proxies, and clients by sending specially crafted HTTP requests with oversized headers, leading to service unavailability.

Affected Products

  • Golang Go (versions before 1.15.12)
  • Golang Go (versions 1.16.x before 1.16.4)
  • Fedora Project Fedora 34

Discovery Timeline

  • 2021-05-27 - CVE-2021-31525 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-31525

Vulnerability Analysis

This vulnerability stems from improper handling of HTTP headers within the net/http package in Go. When processing HTTP requests or responses, the ReadRequest and ReadResponse functions fail to properly validate the size of incoming headers before processing them. This can lead to uncontrolled resource consumption and ultimately a panic condition that crashes the application.

The vulnerability is classified under CWE-674 (Uncontrolled Recursion), indicating that the underlying issue relates to how the header parsing logic handles deeply nested or excessively large input data. When a maliciously crafted HTTP message with an oversized header is received, the parsing mechanism can enter a state that triggers a panic, terminating the Go process.

Root Cause

The root cause lies in the insufficient bounds checking within the HTTP header parsing routines. The ReadRequest and ReadResponse functions in the net/http package did not implement adequate safeguards against excessively large header values. This allows an attacker to send headers that exceed expected size limits, causing resource exhaustion that manifests as a runtime panic.

Attack Vector

The attack can be executed remotely over the network without authentication. An attacker constructs an HTTP request or response containing an abnormally large header field and sends it to a vulnerable Go application. The attack scenarios include:

  • Server Attack: Sending a malicious HTTP request with an oversized header to a Go HTTP server
  • Client Attack: A malicious server responding with oversized headers to a Go HTTP client
  • Transport Attack: Exploiting Go applications using custom HTTP transports that process untrusted HTTP messages

The attack complexity is considered high because specific conditions must be met for successful exploitation, such as the target application not having implemented additional size limits on incoming data.

Detection Methods for CVE-2021-31525

Indicators of Compromise

  • Unexpected application crashes or panics in Go-based HTTP services
  • Log entries indicating panic conditions in net/http package functions
  • Network traffic containing HTTP requests or responses with abnormally large header sizes
  • Service availability issues for Go applications handling HTTP traffic

Detection Strategies

  • Monitor for Go runtime panic events in application logs, specifically those originating from net/http package
  • Implement network intrusion detection rules to flag HTTP traffic with headers exceeding normal size thresholds (e.g., headers larger than 1MB)
  • Track application crash frequencies and correlate with incoming HTTP traffic patterns
  • Use endpoint detection and response (EDR) solutions to identify process terminations consistent with panic conditions

Monitoring Recommendations

  • Configure alerting on Go application crashes with stack traces mentioning ReadRequest or ReadResponse
  • Establish baseline metrics for HTTP header sizes in your environment and alert on anomalies
  • Monitor system resource utilization (memory, CPU) for spikes that may precede crash events
  • Implement centralized logging to correlate crash events across multiple Go-based services

How to Mitigate CVE-2021-31525

Immediate Actions Required

  • Upgrade Go to version 1.15.12 or later for the 1.15.x branch
  • Upgrade Go to version 1.16.4 or later for the 1.16.x branch
  • Recompile all Go applications using the patched Go version
  • Review and apply vendor-specific patches for Fedora 34 users

Patch Information

The Go development team addressed this vulnerability in Go versions 1.15.12 and 1.16.4. Users should update their Go installation and rebuild affected applications. For detailed information about the fix, refer to the GitHub Issue Discussion and the Google Groups Announcement. Fedora users should apply updates as announced in the Fedora Package Announcement.

Workarounds

  • Implement reverse proxy or web application firewall (WAF) rules to limit incoming HTTP header sizes
  • Configure load balancers to reject requests with headers exceeding reasonable size thresholds
  • Deploy network-level protections to filter HTTP traffic with abnormally large headers before it reaches Go applications
  • Consider implementing application-level header size validation as an additional defense layer
bash
# Example: Configure nginx as a reverse proxy with header size limits
# Add to nginx server configuration to limit header buffer size
large_client_header_buffers 4 16k;
client_header_buffer_size 4k;

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechGolang

  • SeverityMEDIUM

  • CVSS Score5.9

  • EPSS Probability0.01%

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

  • Fedora Package Announcement

  • Gentoo GLSA Advisory
  • Vendor Resources
  • GitHub Issue Discussion
  • 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