A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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-2026-50219

CVE-2026-50219: libexpat Use-After-Free Vulnerability

CVE-2026-50219 is a use-after-free vulnerability in libexpat before version 2.8.2 caused by missing handler call depth tracking. This post covers the technical details, affected versions, impact, and mitigation.

Published: June 4, 2026

CVE-2026-50219 Overview

CVE-2026-50219 is a use-after-free vulnerability in libexpat, the widely deployed C library for parsing XML documents. Versions before 2.8.2 fail to track handler call depth when applications invoke XML_GetBuffer, XML_Parse, XML_ParseBuffer, XML_ParserFree, or XML_ParserReset from within handler callbacks during policy violation conditions. The missing depth tracking creates a window where memory can be freed and subsequently accessed, leading to use-after-free [CWE-416]. Applications that embed libexpat and call these parser APIs from inside user-defined handlers are exposed to memory corruption that can affect confidentiality, integrity, and availability of the parsing process.

Critical Impact

Local attackers triggering crafted parser flows can cause use-after-free conditions in libexpat versions prior to 2.8.2, leading to memory corruption in any application that links the library.

Affected Products

  • libexpat versions prior to 2.8.2
  • Applications and language bindings that embed libexpat for XML parsing
  • Operating system distributions shipping vulnerable libexpat packages

Discovery Timeline

  • 2026-06-04 - CVE-2026-50219 published to NVD
  • 2026-06-04 - Last updated in NVD database

Technical Details for CVE-2026-50219

Vulnerability Analysis

The vulnerability resides in libexpat's handling of re-entrant parser API calls. When an application registers handler callbacks for XML events, those handlers can legitimately invoke parser control functions such as XML_Parse, XML_ParseBuffer, XML_GetBuffer, XML_ParserReset, and XML_ParserFree. Prior to version 2.8.2, libexpat does not track the depth of these handler invocations when a policy violation occurs during parsing. The parser proceeds to free internal data structures while references to those structures remain reachable on the call stack. Subsequent operations dereference the dangling memory, producing a classic use-after-free condition [CWE-416].

Root Cause

The root cause is the absence of handler call depth tracking inside libexpat's control flow. The library cannot distinguish between top-level parser invocations and nested invocations from within a handler. When a policy violation triggers cleanup paths, the parser frees objects that the outer invocation still expects to use. This design gap allows reachable references to dangling memory, which the GitHub pull request for libexpat addresses by introducing depth tracking and safe-cleanup logic.

Attack Vector

Exploitation requires local access and crafted XML input that drives the parser into a policy violation while a handler invokes one of the affected APIs. The attack complexity is high because the attacker must arrange the precise nested-call state required to reach the unsafe free. Successful exploitation yields limited impact on confidentiality, integrity, and availability of the parsing process, but on hardened targets, memory corruption primitives can sometimes be escalated. No public proof-of-concept exploit is available, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog.

No verified exploit code is available. Refer to the GitHub Pull Request for libexpat for technical fix details.

Detection Methods for CVE-2026-50219

Indicators of Compromise

  • Unexpected crashes or segmentation faults in processes that link libexpat during XML parsing operations
  • Abnormal termination of XML-processing daemons, language runtimes, or build tools that embed expat
  • Core dumps referencing freed heap chunks inside expat parser structures

Detection Strategies

  • Inventory installed libexpat versions across Linux, macOS, and Windows hosts and flag any release prior to 2.8.2
  • Use software composition analysis to identify applications statically linking vulnerable libexpat builds
  • Run AddressSanitizer or Valgrind against XML-processing workloads in test environments to surface use-after-free conditions

Monitoring Recommendations

  • Monitor crash telemetry and core dump generation for processes consuming untrusted XML input
  • Alert on repeated parser failures in services that expose XML endpoints to local users
  • Track package management events that install or update libexpat across the fleet

How to Mitigate CVE-2026-50219

Immediate Actions Required

  • Upgrade libexpat to version 2.8.2 or later on all affected systems
  • Rebuild and redistribute applications that statically link libexpat against the patched release
  • Audit application code that invokes XML_Parse, XML_ParseBuffer, XML_GetBuffer, XML_ParserReset, or XML_ParserFree from inside handlers

Patch Information

The upstream fix is tracked in the GitHub Pull Request for libexpat, which introduces handler call depth tracking for the affected APIs. Operating system vendors are expected to backport the fix into their libexpat packages. Apply distribution updates as they become available and verify the installed version reports 2.8.2 or later.

Workarounds

  • Avoid calling XML_GetBuffer, XML_Parse, XML_ParseBuffer, XML_ParserFree, or XML_ParserReset from within handler callbacks until patched
  • Restrict XML inputs to trusted sources and limit local access to processes that parse untrusted XML
  • Run XML-processing services under reduced privileges and with memory-safety mitigations such as ASLR and heap hardening enabled

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/TechLibexpat

  • SeverityMEDIUM

  • CVSS Score4.9

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-416
  • Technical References
  • GitHub Pull Request for libexpat
  • Related CVEs
  • CVE-2022-43680: Libexpat Use-After-Free Vulnerability

  • CVE-2022-40674: Libexpat Use-After-Free Vulnerability

  • CVE-2026-7210: Libexpat XXE Vulnerability

  • CVE-2026-45186: Libexpat DOS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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