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-2022-24921

CVE-2022-24921: Golang Go DOS Vulnerability

CVE-2022-24921 is a denial of service flaw in Golang Go's regexp.Compile function that allows stack exhaustion through deeply nested expressions. This article covers technical details, affected versions, and mitigation.

Published: February 17, 2026

CVE-2022-24921 Overview

CVE-2022-24921 is a stack exhaustion vulnerability in the Go programming language's regexp.Compile function. The vulnerability allows attackers to cause a denial of service condition by supplying a deeply nested regular expression, which exhausts the stack during compilation. This affects Go versions before 1.16.15 and 1.17.x versions before 1.17.8.

Critical Impact

This vulnerability enables remote attackers to crash applications that process untrusted regular expressions, leading to denial of service. Any Go application that compiles user-supplied regex patterns is potentially affected.

Affected Products

  • Golang Go (versions before 1.16.15 and 1.17.x before 1.17.8)
  • NetApp Astra Trident
  • Debian Linux 9.0

Discovery Timeline

  • 2022-03-05 - CVE-2022-24921 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-24921

Vulnerability Analysis

The vulnerability exists in the regexp.Compile function within Go's standard library. When processing regular expressions with deeply nested structures (such as multiple levels of grouping or alternation), the compiler uses recursive function calls to parse the expression tree. Without proper depth limits, an attacker can craft a malicious regex pattern that causes the call stack to grow beyond available memory, resulting in a stack overflow and subsequent application crash.

This type of vulnerability is particularly dangerous in server applications that accept user-provided regular expressions, such as search functionality, input validation systems, or configuration parsing. The attack can be executed remotely over the network without requiring authentication, making it accessible to unauthenticated attackers.

Root Cause

The root cause is categorized as CWE-674 (Uncontrolled Recursion). The regexp.Compile function's parser recursively descends into nested expression components without enforcing a maximum recursion depth. When processing expressions like (((((((((((...)))))))))))with sufficient nesting levels, each level of parentheses triggers another recursive call, eventually exhausting the available stack space. The fix involves implementing proper recursion depth limits during regex compilation.

Attack Vector

The attack vector is network-based and requires no user interaction or special privileges. An attacker can exploit this vulnerability by sending a crafted regular expression string to any endpoint that passes the input to regexp.Compile, regexp.MustCompile, or related functions. The attack payload consists of a deeply nested regex pattern that triggers uncontrolled recursion during the parsing phase.

For example, a malicious regex might contain thousands of nested groups or alternation operators. When the application attempts to compile this pattern, the recursive descent parser will exhaust the stack before completing, causing the entire application or goroutine to crash. In production environments, this could lead to service unavailability.

Detection Methods for CVE-2022-24921

Indicators of Compromise

  • Sudden application crashes or restarts in Go applications that process regex patterns
  • Stack overflow errors or panic messages in application logs referencing the regexp package
  • Abnormally long or complex regular expression strings in request logs
  • Memory or stack-related errors in containerized Go applications

Detection Strategies

  • Monitor application logs for panic messages containing regexp/syntax or stack overflow indicators
  • Implement request logging to capture and analyze unusually large or complex regex inputs
  • Use runtime monitoring to detect abnormal stack growth patterns in Go processes
  • Deploy application performance monitoring (APM) to track regex compilation times and resource usage

Monitoring Recommendations

  • Set up alerts for Go application crashes that include regexp in the stack trace
  • Monitor for repeated crash-restart cycles that could indicate exploitation attempts
  • Track the size and complexity of user-submitted regex patterns at the application layer
  • Implement SentinelOne Singularity Platform for real-time process monitoring and crash detection

How to Mitigate CVE-2022-24921

Immediate Actions Required

  • Upgrade Go to version 1.16.15 or later (for 1.16.x branch) or 1.17.8 or later (for 1.17.x branch)
  • Audit applications to identify all locations where user input is passed to regexp.Compile
  • Implement input validation to limit the length and complexity of user-supplied regex patterns
  • Deploy SentinelOne Singularity Platform for automated detection of exploitation attempts

Patch Information

The Go team addressed this vulnerability in Go versions 1.16.15 and 1.17.8 by implementing proper recursion depth limits in the regex parser. Organizations should upgrade to these patched versions or later to fully remediate the vulnerability. For detailed patch information, refer to the Golang Announcement Google Group.

Additional vendor advisories are available from:

  • NetApp Security Advisory NTAP-20220325-0010
  • Debian LTS Advisory #20220417
  • Gentoo GLSA 2022-08-02
  • Siemens Security Certification Document

Workarounds

  • Implement application-level input validation to reject regex patterns exceeding a maximum length threshold
  • Add preprocessing logic to count nesting depth before passing patterns to regexp.Compile
  • Use timeouts when compiling user-supplied regular expressions to limit resource consumption
  • Consider using alternative regex libraries with built-in recursion limits for untrusted input
bash
# Verify Go version is patched
go version
# Expected output should show go1.16.15+, go1.17.8+, or go1.18+

# Update Go to the latest stable version
# For Linux/macOS using official installer:
wget https://go.dev/dl/go1.21.latest.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.21.latest.linux-amd64.tar.gz

# Verify the update
go version

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

  • 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-674
  • Technical References
  • Siemens Security Certification Document

  • Golang Announcement Google Group

  • Debian LTS Advisory #20220417

  • Debian LTS Advisory #20220418

  • Debian LTS Advisory #20230421

  • Gentoo GLSA 2022-08-02

  • NetApp Security Advisory NTAP-20220325-0010
  • 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