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

CVE-2022-23514: Loofah Library DoS Vulnerability

CVE-2022-23514 is a denial of service vulnerability in Loofah library caused by inefficient regex backtracking in SVG sanitization. This article covers the technical details, affected versions, impact, and mitigation.

Published: February 18, 2026

CVE-2022-23514 Overview

CVE-2022-23514 is a Regular Expression Denial of Service (ReDoS) vulnerability affecting Loofah, a widely-used Ruby library for manipulating and transforming HTML/XML documents and fragments built on top of Nokogiri. The vulnerability exists in versions prior to 2.19.1 and stems from an inefficient regular expression used when sanitizing certain SVG attributes. When processing specially crafted input, the vulnerable regex pattern is susceptible to excessive backtracking, leading to CPU resource exhaustion and potential denial of service conditions.

Critical Impact

Applications using vulnerable Loofah versions for HTML/SVG sanitization may be subject to denial of service attacks through CPU resource consumption when processing malicious SVG content.

Affected Products

  • Loofah versions prior to 2.19.1
  • Ruby applications using Loofah for HTML/XML sanitization
  • Web applications leveraging Nokogiri-based document processing with Loofah

Discovery Timeline

  • 2022-12-14 - CVE-2022-23514 published to NVD
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2022-23514

Vulnerability Analysis

This vulnerability falls under CWE-1333 (Inefficient Regular Expression Complexity), commonly known as ReDoS (Regular Expression Denial of Service). The flaw resides in Loofah's SVG attribute sanitization logic, where a poorly constructed regular expression pattern exhibits catastrophic backtracking behavior when confronted with adversarial input strings.

When Loofah processes HTML or XML documents containing SVG elements, it applies sanitization rules to filter potentially dangerous attributes. The vulnerable regular expression used in this process has exponential time complexity for certain input patterns. An attacker can exploit this by crafting SVG attributes that trigger worst-case regex evaluation, causing the Ruby process to consume excessive CPU cycles while attempting to match or reject the malicious input.

The vulnerability is particularly concerning for web applications that accept user-supplied HTML content and sanitize it before rendering or storage. Common use cases include content management systems, forum software, email clients with HTML rendering, and any application that processes untrusted HTML/SVG content.

Root Cause

The root cause is an inefficient regular expression pattern used during SVG attribute sanitization. The regex contains constructs that lead to excessive backtracking when the input string is crafted to exploit the pattern's structure. This is a classic algorithmic complexity vulnerability where the time required to evaluate the regex grows exponentially with input size, rather than linearly.

Regular expressions with nested quantifiers or overlapping alternatives are particularly susceptible to this class of vulnerability. When the regex engine attempts to match such patterns against non-matching input, it may explore an exponential number of possible matching paths before concluding that no match exists.

Attack Vector

The attack vector is network-based, requiring no authentication or user interaction. An attacker can exploit this vulnerability by submitting specially crafted SVG content to any application endpoint that processes user-supplied HTML/XML through Loofah's sanitization functions.

The attack is executed by including SVG elements with maliciously crafted attribute values designed to trigger catastrophic regex backtracking. When the application attempts to sanitize this content, the vulnerable regex pattern enters an extended processing state, consuming CPU resources and potentially rendering the application unresponsive. Additional details about the vulnerability can be found in the GitHub Security Advisory and the original HackerOne Report #1684163.

Detection Methods for CVE-2022-23514

Indicators of Compromise

  • Abnormally high CPU utilization during HTML/XML processing operations
  • Application request timeouts coinciding with HTML sanitization operations
  • Increased response latency for endpoints handling user-submitted HTML content
  • Ruby process hangs or unresponsiveness during content processing

Detection Strategies

  • Monitor application performance metrics for unusual CPU spikes during content processing
  • Implement request timeout monitoring for HTML sanitization endpoints
  • Use dependency scanning tools to identify Loofah versions below 2.19.1
  • Review application logs for timeout errors related to content sanitization operations

Monitoring Recommendations

  • Configure alerting for sustained high CPU utilization on application servers
  • Implement request duration monitoring with thresholds for sanitization endpoints
  • Deploy runtime application self-protection (RASP) solutions to detect ReDoS patterns
  • Use SentinelOne Singularity to monitor for anomalous process behavior and resource exhaustion patterns

How to Mitigate CVE-2022-23514

Immediate Actions Required

  • Upgrade Loofah to version 2.19.1 or later immediately
  • Audit all Ruby applications for Loofah dependency usage
  • Implement request timeouts on endpoints processing user-supplied HTML content
  • Consider input size limits for HTML content submitted to sanitization functions

Patch Information

The vulnerability has been addressed in Loofah version 2.19.1. The fix involves replacing the inefficient regular expression with an optimized pattern that does not exhibit catastrophic backtracking behavior. Organizations should update their Gemfile to specify the patched version and run bundle update loofah to apply the fix.

For Debian-based systems, security updates have been released as documented in the Debian LTS Security Announcements.

Workarounds

  • Implement request timeout limits to prevent long-running sanitization operations from consuming resources indefinitely
  • Apply input size restrictions on SVG content to reduce the effectiveness of ReDoS payloads
  • Consider pre-filtering SVG elements from untrusted input if SVG functionality is not required
  • Deploy rate limiting on endpoints that process user-supplied HTML content
bash
# Update Loofah to patched version
bundle update loofah

# Verify installed version
bundle show loofah
# Should show loofah-2.19.1 or later

# Alternative: Specify minimum version in Gemfile
echo "gem 'loofah', '>= 2.19.1'" >> Gemfile
bundle install

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechLoofah

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.29%

  • 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-1333
  • Technical References
  • GitHub Security Advisory

  • HackerOne Report #1684163

  • Debian LTS Security Announcement

  • Debian LTS Security Announcement
  • Latest CVEs
  • CVE-2025-52479: HTTP.jl & URIs.jl CRLF Injection Flaw

  • CVE-2026-31740: Linux Kernel Race Condition Vulnerability

  • CVE-2026-31743: Linux Kernel Buffer Overflow Vulnerability

  • CVE-2026-31744: Linux Kernel NULL Pointer 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