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-24713

CVE-2022-24713: Rust-lang Regex DoS Vulnerability

CVE-2022-24713 is a denial of service vulnerability in Rust-lang Regex that allows attackers to bypass parsing time mitigations. This post covers the technical details, affected versions, impact, and mitigation strategies.

Published: February 17, 2026

CVE-2022-24713 Overview

CVE-2022-24713 is a denial of service vulnerability in the Rust regex crate, an implementation of regular expressions for the Rust programming language. The regex crate features built-in mitigations designed to prevent denial of service attacks caused by untrusted regexes or untrusted input matched by trusted regexes. However, a bug was discovered in these mitigations that allows attackers to craft specially designed regexes that bypass the protective measures, enabling denial of service attacks against services that accept user-controlled regular expressions.

Critical Impact

Services accepting user-controlled regexes are vulnerable to denial of service attacks through specially crafted regex patterns that bypass built-in mitigations, causing excessive parsing time and resource exhaustion.

Affected Products

  • rust-lang regex (versions ≤ 1.5.4)
  • Fedora 34, 35, and 36
  • Debian Linux 9.0, 10.0, and 11.0

Discovery Timeline

  • 2022-03-08 - CVE-2022-24713 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-24713

Vulnerability Analysis

This vulnerability exploits a flaw in the regex crate's denial of service mitigations. The regex crate was designed with tunable mitigations that provide sane defaults to prevent attacks from untrusted regexes taking arbitrary amounts of time during parsing. This guarantee was documented as part of the crate's API. However, a bug in the mitigation logic allows attackers to construct regex patterns that circumvent these protections entirely.

The vulnerability is classified under CWE-400 (Uncontrolled Resource Consumption) and CWE-1333 (Inefficient Regular Expression Complexity). The attack can be performed remotely without authentication, making any service that accepts user-controlled regex patterns a potential target.

Root Cause

The root cause lies in how the regex compiler tracks memory allocation during compilation. Specifically, empty sub-expressions did not properly contribute to the tracked heap memory usage, which is an implementation detail. Without proper accounting for empty sub-expressions, excessively large repetitions on empty sub-expressions could cause the compiler to consume excessive CPU time without triggering the size limit restrictions that would normally cause compilation to bail out.

Attack Vector

The attack vector is network-based and requires no privileges or user interaction. An attacker can send specially crafted regex patterns to any service that accepts user-controlled regular expressions. Because there are practically infinite regex patterns that could exploit this vulnerability, it is not possible to maintain a fixed set of problematic patterns to block.

rust
// Security patch in src/compile.rs - security: fix denial-of-service bug in compiler
     suffix_cache: SuffixCache,
     utf8_seqs: Option<Utf8Sequences>,
     byte_classes: ByteClassSet,
+    // This keeps track of extra bytes allocated while compiling the regex
+    // program. Currently, this corresponds to two things. First is the heap
+    // memory allocated by Unicode character classes ('InstRanges'). Second is
+    // a "fake" amount of memory used by empty sub-expressions, so that enough
+    // empty sub-expressions will ultimately trigger the compiler to bail
+    // because of a size limit restriction. (That empty sub-expressions don't
+    // add to heap memory usage is more-or-less an implementation detail.) In
+    // the second case, if we don't bail, then an excessively large repetition
+    // on an empty sub-expression can result in the compiler using a very large
+    // amount of CPU time.
     extra_inst_bytes: usize,
 }

Source: GitHub Regex Commit

Detection Methods for CVE-2022-24713

Indicators of Compromise

  • Unusual CPU spikes on services that process user-supplied regular expressions
  • Extended response times or timeouts on regex compilation operations
  • Application hangs or unresponsiveness when processing regex patterns
  • Log entries indicating regex compilation failures or timeouts

Detection Strategies

  • Monitor CPU utilization on services that accept user-controlled regex patterns for abnormal spikes
  • Implement application-level logging for regex compilation times and flag patterns that exceed expected thresholds
  • Use dependency scanning tools to identify vulnerable versions of the regex crate (≤ 1.5.4) in your Rust applications

Monitoring Recommendations

  • Set up alerts for sustained high CPU usage on services processing user input
  • Monitor application response times and establish baselines for regex operations
  • Implement timeout mechanisms for regex compilation and pattern matching operations
  • Review dependency audit reports regularly for known vulnerable packages

How to Mitigate CVE-2022-24713

Immediate Actions Required

  • Upgrade the regex crate to version 1.5.5 or later immediately
  • Audit all Rust applications that accept user-controlled regex patterns
  • Apply operating system vendor patches for Fedora and Debian systems
  • Consider implementing additional input validation or regex complexity limits at the application layer

Patch Information

The fix is included starting from regex version 1.5.5. The patch addresses the issue by tracking "fake" memory allocation for empty sub-expressions, ensuring that excessively large repetitions on empty patterns will properly trigger the compiler's size limit restrictions and bail out before consuming excessive CPU time.

Vendor patches are available:

  • Rust-lang Security Announcement
  • GitHub Security Advisory
  • Debian Security Advisory DSA-5113
  • Debian Security Advisory DSA-5118
  • Gentoo GLSA 202208-08

Workarounds

  • Avoid accepting user-controlled regular expressions if possible; use predefined patterns instead
  • Implement strict timeout limits on regex compilation and matching operations
  • Deploy rate limiting on endpoints that accept regex patterns to reduce attack surface
  • Consider using alternative regex validation approaches that do not expose the full regex compilation pipeline to untrusted input
bash
# Update the regex crate in Cargo.toml
# Ensure minimum version 1.5.5
cargo update -p regex

# Verify the installed version
cargo tree -i regex

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechRust Lang Regex

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability6.94%

  • 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-400

  • CWE-1333
  • Technical References
  • GitHub Security Advisory

  • Rustlang Security Announcement

  • Debian LTS Announcement #1

  • Debian LTS Announcement #2

  • Fedora Package Announcement #1

  • Fedora Package Announcement #2

  • Fedora Package Announcement #3

  • Gentoo GLSA 202208-08

  • Gentoo GLSA 202208-14

  • Debian Security Advisory #5113

  • Debian Security Advisory #5118
  • Vendor Resources
  • GitHub Regex Commit
  • Latest CVEs
  • CVE-2025-52793: Esselink.nu Settings CSRF Vulnerability

  • CVE-2025-52772: Virtual Moderator CSRF Vulnerability

  • CVE-2025-48279: WC MyParcel Belgium XSS Vulnerability

  • CVE-2025-39381: KiotViet Sync CSRF 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