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

CVE-2022-23308: Xmlsoft Libxml2 Use-After-Free Vulnerability

CVE-2022-23308 is a use-after-free vulnerability in Xmlsoft Libxml2 affecting ID and IDREF attributes. This flaw can lead to memory corruption and potential code execution. This post covers technical details, affected versions, and mitigation.

Published: February 18, 2026

CVE-2022-23308 Overview

CVE-2022-23308 is a use-after-free vulnerability discovered in valid.c within libxml2 versions prior to 2.9.13. The flaw occurs during the handling of ID and IDREF attributes, where memory can be accessed after it has been freed. This memory corruption issue can be triggered when processing specially crafted XML documents containing these attribute types, potentially leading to application crashes or denial of service conditions.

libxml2 is one of the most widely used XML parsing libraries, providing a foundation for XML processing across countless applications, operating systems, and enterprise software. The library's extensive adoption means this vulnerability has far-reaching implications across multiple ecosystems including Apple devices, Linux distributions, NetApp storage systems, and Oracle enterprise products.

Critical Impact

Use-after-free vulnerability in a fundamental XML parsing library affecting multiple major operating systems and enterprise platforms. Network-exploitable denial of service possible through malicious XML document processing.

Affected Products

  • xmlsoft libxml2 (versions before 2.9.13)
  • Apple iOS, iPadOS, macOS, tvOS, watchOS
  • Fedora 34
  • Debian Linux 9.0
  • NetApp ONTAP, Active IQ Unified Manager, and various storage appliances
  • Oracle Communications Cloud Native Core products
  • Oracle MySQL Workbench
  • Oracle ZFS Storage Appliance Kit 8.8

Discovery Timeline

  • 2022-02-26 - CVE-2022-23308 published to NVD
  • 2025-05-05 - Last updated in NVD database

Technical Details for CVE-2022-23308

Vulnerability Analysis

The vulnerability resides in the valid.c component of libxml2, specifically in the validation logic for XML ID and IDREF attributes. When processing XML documents with DTD validation enabled, the parser maintains references to ID attributes for subsequent IDREF validation. The use-after-free condition occurs when memory containing ID attribute data is freed but references to that memory remain in use during IDREF validation operations.

This class of memory corruption vulnerability can result in unpredictable behavior including application crashes, memory disclosure, or in certain configurations, potential code execution. The network attack vector with no authentication requirements means attackers can potentially exploit this vulnerability by sending malicious XML content to any application using the vulnerable libxml2 library for parsing.

Root Cause

The root cause is improper memory management in the XML validation routines within valid.c. The code failed to properly track and invalidate pointers to ID attribute memory after deallocation. When subsequent validation operations attempted to reference freed memory for IDREF attribute validation, a use-after-free condition occurred. The fix introduces a xmlValidNormalizeString() function and properly manages the lifecycle of ID/IDREF attribute memory.

Attack Vector

An attacker can exploit this vulnerability by crafting a malicious XML document containing specific ID and IDREF attributes designed to trigger the use-after-free condition. The attack requires the target application to parse the malicious XML with validation enabled. Attack scenarios include:

  • Uploading malicious XML files to web applications
  • Sending crafted XML payloads to web services or APIs
  • Embedding malicious XML in document formats that use libxml2 for parsing
  • Exploiting applications that process external XML data sources
c
// Security patch in valid.c - [CVE-2022-23308] Use-after-free of ID and IDREF attributes
    return (ret);
}

+/**
+ * xmlValidNormalizeString:
+ * @str: a string
+ *
+ * Normalize a string in-place.
+ */
+static void
+xmlValidNormalizeString(xmlChar *str) {
+    xmlChar *dst;
+    const xmlChar *src;
+
+    if (str == NULL)
+        return;
+    src = str;
+    dst = str;
+
+    while (*src == 0x20) src++;
+    while (*src != 0) {
+	if (*src == 0x20) {
+	    while (*src == 0x20) src++;
+	    if (*src != 0)
+		*dst++ = 0x20;
+	} else {
+	    *dst++ = *src++;
+	}
+    }
+    *dst = 0;

Source: GitHub Commit for libxml2

Detection Methods for CVE-2022-23308

Indicators of Compromise

  • Unexpected application crashes during XML parsing operations with stack traces referencing valid.c or ID/IDREF validation functions
  • Abnormal memory consumption or segmentation faults in processes utilizing libxml2
  • Core dumps indicating memory corruption in libxml2 validation routines
  • Log entries showing XML parsing failures specifically during validation phases

Detection Strategies

  • Deploy memory corruption detection tools such as AddressSanitizer (ASan) in development and testing environments to identify use-after-free conditions
  • Monitor application logs for crashes or errors related to XML parsing and DTD validation
  • Implement software composition analysis (SCA) tools to identify libxml2 versions prior to 2.9.13 in your environment
  • Use vulnerability scanners to detect affected libxml2 installations across endpoints and servers

Monitoring Recommendations

  • Configure crash reporting systems to alert on libxml2-related failures
  • Enable audit logging for applications processing external XML content
  • Monitor network traffic for unusual XML payloads targeting XML processing endpoints
  • Implement file integrity monitoring for libxml2 shared libraries to detect unauthorized modifications

How to Mitigate CVE-2022-23308

Immediate Actions Required

  • Upgrade libxml2 to version 2.9.13 or later across all affected systems
  • Apply vendor-specific security patches from Apple, Oracle, NetApp, Debian, and Fedora
  • Identify all applications and systems using vulnerable libxml2 versions through software inventory
  • Consider temporarily disabling DTD validation for external XML content if patching is delayed

Patch Information

The vulnerability was addressed in libxml2 version 2.9.13. The patch introduces the xmlValidNormalizeString() function and fixes the memory management issues in ID/IDREF attribute handling. For detailed patch information, refer to the GitHub Commit for libxml2 and the libxml2 v2.9.13 Release Notes.

Vendor-specific patches are available from:

  • Apple Support Documents (HT213253 through HT213258)
  • Oracle Critical Patch Update July 2022
  • NetApp Security Advisory NTAP-20220331-0008
  • Debian LTS Security Advisory
  • Gentoo GLSA 202210-03

Workarounds

  • Disable XML DTD validation for untrusted XML content where feasible
  • Implement input validation to reject XML documents with potentially malicious ID/IDREF attribute patterns
  • Deploy web application firewalls (WAF) configured to inspect and filter malicious XML payloads
  • Isolate applications processing external XML in sandboxed environments with restricted memory access
bash
# Check installed libxml2 version on Linux systems
xml2-config --version

# Update libxml2 on Debian/Ubuntu
sudo apt update && sudo apt install libxml2

# Update libxml2 on RHEL/CentOS/Fedora
sudo dnf update libxml2

# Verify updated version
xml2-config --version
# Should output 2.9.13 or later

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

  • Vulnerability Details
  • TypeUse After Free

  • Vendor/TechLibxml2

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.06%

  • 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-416
  • Technical References
  • Full Disclosure May 2022 Post #33

  • Full Disclosure May 2022 Post #34

  • Full Disclosure May 2022 Post #35

  • Full Disclosure May 2022 Post #36

  • Full Disclosure May 2022 Post #37

  • Full Disclosure May 2022 Post #38

  • GitLab libxml2 News Release

  • Debian LTS Announcement April 2022

  • Fedora Package Announcement

  • Gentoo GLSA 2022-10-03

  • NetApp Security Advisory NTAP-20220331-0008

  • Apple Support Document HT213253

  • Apple Support Document HT213254

  • Apple Support Document HT213255

  • Apple Support Document HT213256

  • Apple Support Document HT213257

  • Apple Support Document HT213258
  • Vendor Resources
  • GitHub Commit for libxml2

  • Oracle Security Alert CPU July 2022
  • Related CVEs
  • CVE-2025-27113: Xmlsoft Libxml2 Use After Free Flaw

  • CVE-2024-25062: Xmlsoft Libxml2 Use-After-Free Vulnerability

  • CVE-2024-56171: Xmlsoft Libxml2 Use-After-Free Flaw

  • CVE-2023-45322: Libxml2 Use-After-Free 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