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-2023-3823

CVE-2023-3823: PHP XXE Vulnerability via libxml State

CVE-2023-3823 is an XML External Entity vulnerability in PHP affecting versions 8.0.*, 8.1.*, and 8.2.*. This flaw enables unauthorized file disclosure through libxml state manipulation. Explore technical details and patches.

Published: February 11, 2026

CVE-2023-3823 Overview

CVE-2023-3823 is an XML External Entity (XXE) vulnerability affecting PHP versions 8.0.* before 8.0.30, 8.1.* before 8.1.22, and 8.2.* before 8.2.8. The vulnerability arises from PHP's XML functions relying on libxml global state to track configuration variables, including whether external entities are loaded. When other modules such as ImageMagick operate within the same process and modify this global state, external entity loading can be inadvertently enabled, leading to potential disclosure of local files accessible to PHP.

Critical Impact

This vulnerability can lead to unauthorized disclosure of sensitive local files accessible to PHP, potentially exposing configuration files, credentials, and other confidential data. The vulnerable state may persist across multiple requests until the process is shut down.

Affected Products

  • PHP 8.0.* before 8.0.30
  • PHP 8.1.* before 8.1.22
  • PHP 8.2.* before 8.2.8
  • Fedora 38
  • Debian Linux 10.0

Discovery Timeline

  • August 11, 2023 - CVE-2023-3823 published to NVD
  • February 13, 2025 - Last updated in NVD database

Technical Details for CVE-2023-3823

Vulnerability Analysis

This XXE vulnerability stems from PHP's architecture around libxml configuration management. PHP's XML parsing functions depend on libxml's process-global state to determine security-critical settings, particularly the configuration for loading external entities. The core issue is that PHP assumes this global state remains unchanged unless explicitly modified by user code calling the appropriate PHP functions.

However, in shared hosting environments or applications using multiple libraries, other modules like ImageMagick also utilize libxml for their internal XML processing needs. When these modules modify the global libxml configuration to enable external entity loading for their purposes, they may leave the state in this insecure configuration. Subsequent PHP XML parsing operations within the same process then inherit this vulnerable state.

The vulnerability enables attackers to craft malicious XML payloads that reference external entities pointing to local files. When processed by an affected PHP application, the parser resolves these external entity references and includes the contents of the targeted files in the parsed output. This can expose sensitive files such as /etc/passwd, application configuration files containing database credentials, or other confidential data accessible to the PHP process.

The persistent nature of this vulnerability is particularly concerning—once triggered, the vulnerable state can persist across many HTTP requests until the PHP process is recycled, expanding the attack window significantly.

Root Cause

The root cause is PHP's reliance on process-global libxml state for tracking security-sensitive XML parser configuration. The CWE-611 (Improper Restriction of XML External Entity Reference) classification reflects the fundamental issue: when external entity loading is unintentionally enabled through cross-module state pollution, XML parsing becomes susceptible to XXE attacks. The design assumption that global state would only be modified through explicit PHP function calls fails to account for shared library usage patterns in complex application stacks.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker can exploit this vulnerability by:

  1. Submitting crafted XML content to a PHP application that processes XML input
  2. The XML payload contains external entity declarations referencing local files (e.g., file:///etc/passwd)
  3. If the libxml global state has been modified by another module to enable external entities, the parser resolves these references
  4. The contents of the referenced files are included in the parsed XML output, potentially returned to the attacker or logged

The vulnerability is exploitable when the XML parsing occurs after another library (such as ImageMagick) has modified the libxml global state within the same process. This condition may occur unpredictably based on request ordering and process reuse patterns.

Detection Methods for CVE-2023-3823

Indicators of Compromise

  • Unexpected file read operations by PHP processes, particularly targeting sensitive system files like /etc/passwd or application configuration files
  • XML payloads in HTTP requests containing external entity declarations with file://, php://, or other protocol handlers
  • Error logs showing attempts to access files outside normal application scope during XML parsing operations
  • Unusual outbound connections from PHP processes if external DTD or entity URLs are used in attacks

Detection Strategies

  • Monitor web application firewall (WAF) logs for XML requests containing DTD declarations or external entity references
  • Implement file integrity monitoring on sensitive configuration files that could be targeted
  • Review PHP error logs for libxml-related warnings or external entity resolution errors
  • Deploy network monitoring to detect unexpected outbound connections from web server processes

Monitoring Recommendations

  • Enable verbose logging for PHP XML parsing functions to capture entity resolution attempts
  • Implement centralized log analysis to correlate XML processing events with file access patterns
  • Set up alerts for access to sensitive file paths by PHP-FPM or Apache/nginx worker processes
  • Monitor process memory and resource usage for signs of excessive file reading operations

How to Mitigate CVE-2023-3823

Immediate Actions Required

  • Upgrade PHP to patched versions: 8.0.30 or later, 8.1.22 or later, or 8.2.8 or later
  • Review and apply security updates from your operating system vendor (Debian, Fedora, or other distributions)
  • Audit applications for XML processing functionality that may be affected
  • Consider temporarily disabling XML parsing features if immediate patching is not possible

Patch Information

PHP has released security patches addressing this vulnerability in versions 8.0.30, 8.1.22, and 8.2.8. The fix ensures that PHP properly manages libxml configuration state for each XML parsing operation, preventing cross-module state pollution from enabling external entity loading. For additional details, refer to the PHP Security Advisory on GitHub.

Distribution-specific patches are available:

  • Debian LTS Security Announcement
  • Fedora Package Announcement
  • NetApp Security Advisory

Workarounds

  • Explicitly disable external entity loading by calling libxml_disable_entity_loader(true) before any XML parsing operations in PHP code (note: deprecated in PHP 8.0+)
  • Use libxml_set_external_entity_loader() to implement a custom loader that blocks external entity resolution
  • Isolate PHP processes from modules like ImageMagick that may modify libxml global state by using separate process pools
  • Implement input validation to reject XML documents containing DTD declarations or external entity references
bash
# Configuration example - PHP-FPM pool isolation
# Create separate pool for applications using ImageMagick
# /etc/php-fpm.d/imagemagick-pool.conf
[imagemagick_pool]
user = www-data
group = www-data
listen = /run/php-fpm/imagemagick.sock
pm = dynamic
pm.max_children = 10
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 4

# Standard pool for XML processing applications
[xml_pool]
user = www-data
group = www-data
listen = /run/php-fpm/xml.sock
pm = dynamic
pm.max_children = 20
pm.start_servers = 4
pm.min_spare_servers = 2
pm.max_spare_servers = 8

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

  • Vulnerability Details
  • TypeXXE

  • Vendor/TechPhp

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.26%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-611
  • Technical References
  • GitHub Security Advisory

  • Debian LTS Announcement

  • Fedora Package Announcement

  • NetApp Security Advisory
  • Related CVEs
  • CVE-2021-21707: PHP XXE Vulnerability in XML Parsing

  • CVE-2026-22427: GoTravel Path Traversal Vulnerability

  • CVE-2025-69409: PJ Coaching Theme Path Traversal Flaw

  • CVE-2025-52023: Gems CMS Information Disclosure Vulnerability
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