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

CVE-2022-25313: Libexpat DOS Vulnerability

CVE-2022-25313 is a denial of service vulnerability in Libexpat that allows attackers to trigger stack exhaustion through deeply nested DTD elements. This article covers technical details, affected versions, and mitigation.

Published: February 17, 2026

CVE-2022-25313 Overview

CVE-2022-25313 is a stack exhaustion vulnerability affecting Expat (libexpat), a widely-used XML parsing library. In versions prior to 2.4.5, an attacker can trigger stack exhaustion in the build_model function by crafting a malicious XML document with excessive nesting depth in the DTD (Document Type Definition) element. This vulnerability can be exploited remotely to cause a denial of service condition, crashing applications that rely on libexpat for XML parsing.

Critical Impact

Attackers can cause denial of service by sending specially crafted XML documents with deeply nested DTD elements, leading to stack exhaustion and application crashes.

Affected Products

  • libexpat_project libexpat (versions prior to 2.4.5)
  • Debian Linux 10.0 and 11.0
  • Fedora 34 and 35
  • Oracle HTTP Server 12.2.1.3.0 and 12.2.1.4.0
  • Oracle ZFS Storage Appliance Kit 8.8
  • Siemens SINEMA Remote Connect Server

Discovery Timeline

  • 2022-02-18 - CVE-2022-25313 published to NVD
  • 2025-05-30 - Last updated in NVD database

Technical Details for CVE-2022-25313

Vulnerability Analysis

This vulnerability falls under CWE-674 (Uncontrolled Recursion), which occurs when a product does not properly control the amount of recursion that takes place, consuming excessive resources such as stack memory. The build_model function in libexpat processes DTD element declarations recursively. When parsing an XML document containing a DTD with deeply nested content particle definitions, each level of nesting adds a new frame to the call stack. Without proper depth limits, an attacker-controlled XML document can exhaust the available stack space, resulting in a crash.

The attack is network-exploitable and requires user interaction (such as opening a malicious XML file or processing untrusted XML input). While the vulnerability does not allow code execution or data theft, it poses a significant availability risk to any application or service that processes XML data using affected versions of libexpat.

Root Cause

The root cause lies in the recursive nature of the build_model function, which parses content model specifications in DTD element declarations. The function calls itself for each level of nesting in element content particles (sequences and choices). Prior to version 2.4.5, there was no mechanism to limit recursion depth, allowing attackers to craft XML documents with arbitrary nesting levels that exceed the system's stack capacity.

Attack Vector

The attack vector is network-based, requiring an attacker to deliver a malicious XML document to a vulnerable application. This could occur through:

  • Web applications accepting XML uploads or API payloads
  • Email clients or services parsing XML attachments
  • Document processing systems handling untrusted XML content
  • Any network service using libexpat to parse user-supplied XML data

The attacker constructs an XML document with a DTD containing deeply nested element declarations. When the vulnerable application parses this document, the recursive build_model function exhausts the stack, causing the application to crash. The attack does not require authentication and can be executed remotely, though it does require user interaction to process the malicious input.

Detection Methods for CVE-2022-25313

Indicators of Compromise

  • Application crashes or segmentation faults during XML parsing operations
  • Error logs indicating stack overflow or stack exhaustion conditions
  • Presence of XML files with unusually deep DTD element nesting structures
  • Repeated crashes when processing specific XML documents from external sources

Detection Strategies

  • Monitor application logs for crash reports associated with XML parsing components
  • Implement file integrity monitoring to detect suspicious XML files with abnormal structures
  • Use memory monitoring tools to detect stack consumption anomalies during XML processing
  • Deploy intrusion detection rules to identify XML payloads with excessive DTD nesting

Monitoring Recommendations

  • Enable core dump analysis for applications using libexpat to identify crash patterns
  • Set up alerting for repeated application restarts that may indicate DoS attacks
  • Monitor network traffic for unusually large or complex XML documents being submitted to services
  • Track libexpat version deployments across infrastructure to identify vulnerable instances

How to Mitigate CVE-2022-25313

Immediate Actions Required

  • Upgrade libexpat to version 2.4.5 or later immediately across all affected systems
  • Identify all applications and services that depend on libexpat for XML parsing
  • Review and update vendor-specific components including Oracle HTTP Server, Siemens SINEMA Remote Connect Server, and Oracle ZFS Storage Appliance Kit
  • Apply operating system patches from Debian, Fedora, and other distribution vendors

Patch Information

The vulnerability has been addressed in libexpat version 2.4.5. The fix implements depth limiting in the build_model function to prevent excessive recursion. Multiple vendors have released security updates addressing this vulnerability:

  • Libexpat Project: Upgrade to version 2.4.5 or later via the GitHub Pull Request for Expat
  • Oracle: Patches available in the Oracle Security Alert CPUAPR2022
  • Debian: Security updates detailed in Debian DSA-5085 Security Advisory and Debian LTS Announcement
  • Siemens: Patches documented in Siemens Security Patch SSA-484086
  • Gentoo: Updates available via Gentoo GLSA 202209-24
  • NetApp: Advisory available at NetApp Security Advisory NTAP-20220303-0008

Workarounds

  • Implement input validation to reject XML documents with excessive DTD complexity before parsing
  • Configure XML parsers to disable DTD processing entirely if not required for application functionality
  • Deploy web application firewalls (WAF) with rules to detect and block malformed XML payloads
  • Isolate XML parsing operations in sandboxed environments with limited stack resources to contain potential crashes
bash
# Configuration example
# Check current libexpat version on Linux systems
dpkg -l | grep libexpat  # Debian/Ubuntu
rpm -qa | grep expat      # RHEL/Fedora

# Update libexpat to patched version
apt-get update && apt-get install --only-upgrade libexpat1  # Debian/Ubuntu
dnf update expat  # Fedora
yum update expat  # RHEL/CentOS

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechLibexpat

  • SeverityMEDIUM

  • CVSS Score6.5

  • EPSS Probability0.13%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-674
  • Technical References
  • Openwall OSS Security List

  • Siemens Security Patch SSA-484086

  • GitHub Pull Request for Expat

  • Debian LTS Announcement

  • Fedora Package Announcement

  • Fedora Package Update Notice

  • Gentoo GLSA 202209-24

  • NetApp Security Advisory NTAP-20220303-0008

  • Debian DSA-5085 Security Advisory
  • Vendor Resources
  • Oracle Security Alert CPUAPR2022
  • Related CVEs
  • CVE-2026-32777: Libexpat DOS Vulnerability

  • CVE-2025-59375: Libexpat DOS Vulnerability

  • CVE-2023-52425: Libexpat DoS Vulnerability Explained

  • CVE-2026-32778: Libexpat NULL Pointer Dereference Flaw
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