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-2021-29447

CVE-2021-29447: WordPress XXE Vulnerability in Media Library

CVE-2021-29447 is an XML External Entity vulnerability in WordPress Media Library that allows authenticated users to access internal files on PHP 8 installations. This article covers technical details, affected versions, and mitigation.

Published: March 4, 2026

CVE-2021-29447 Overview

CVE-2021-29447 is an XML External Entity (XXE) vulnerability affecting WordPress, one of the most widely deployed open-source content management systems. A user with the ability to upload files (such as an Author role) can exploit an XML parsing issue in the Media Library to conduct XXE attacks. This vulnerability specifically requires the WordPress installation to be running on PHP 8. Successful exploitation enables attackers to access internal files on the server, potentially exposing sensitive configuration data, credentials, and other critical information.

Critical Impact

Authenticated users with file upload privileges can exploit XML parsing flaws to read arbitrary server files, potentially exposing database credentials, configuration files, and other sensitive data from the WordPress installation.

Affected Products

  • WordPress versions prior to 5.7.1 (running on PHP 8)
  • Debian Linux 9.0
  • Debian Linux 10.0

Discovery Timeline

  • April 15, 2021 - CVE-2021-29447 published to NVD
  • April 2021 - WordPress releases security patch in version 5.7.1
  • November 21, 2024 - Last updated in NVD database

Technical Details for CVE-2021-29447

Vulnerability Analysis

This XML External Entity (XXE) vulnerability exists in WordPress's Media Library component, specifically in how it processes metadata from uploaded media files. When a user uploads a specially crafted media file (such as an MP3 or WAV file containing malicious XML in its metadata), the WordPress application parses this XML content using PHP's built-in XML processing functions.

On PHP 8 installations, the XML parser processes external entity references without proper restrictions, allowing attackers to reference local files or internal network resources. The vulnerability is particularly concerning because it can be exploited by authenticated users with relatively low privileges—any user role that has file upload capabilities (Author and above) can potentially trigger this flaw.

Root Cause

The root cause of CVE-2021-29447 lies in WordPress's handling of XML metadata embedded within media files. When processing uploaded files, WordPress extracts and parses metadata using PHP's XML functions. In PHP 8 environments, the libxml_disable_entity_loader() function—which was previously used to prevent XXE attacks—was deprecated and no longer functions as expected. This created a security gap where external entity declarations in XML content are processed without adequate sanitization, enabling attackers to include references to arbitrary files or URLs that the server will then attempt to resolve and include in the parsed output.

Attack Vector

The attack is conducted over the network and requires low-privilege authenticated access. An attacker first creates a malicious media file (typically an MP3 or WAV file) with embedded XML metadata containing external entity declarations pointing to sensitive files such as /etc/passwd or WordPress's wp-config.php. The attacker then uploads this file through WordPress's Media Library interface. When WordPress processes the file to extract its metadata, the XML parser resolves the external entities, causing the server to read the targeted files. The file contents can then be exfiltrated through various techniques, including DNS-based data exfiltration or out-of-band HTTP requests to attacker-controlled servers.

For detailed technical exploitation information, see the SonarSource Blog Analysis and the GitHub Security Advisory. A proof-of-concept demonstrating this vulnerability is available at the CVE-2021-29447 PoC Repository.

Detection Methods for CVE-2021-29447

Indicators of Compromise

  • Unusual media file uploads with suspicious or malformed metadata structures
  • Web server logs showing requests for sensitive files like wp-config.php or /etc/passwd from the media upload handler
  • Outbound DNS queries or HTTP requests to suspicious external domains from the WordPress server during file upload processing
  • Error logs containing XML parsing errors or external entity resolution failures

Detection Strategies

  • Monitor file upload activity for anomalous media files, particularly those with embedded XML payloads in metadata fields
  • Implement web application firewall (WAF) rules to detect XXE attack patterns in uploaded file content
  • Review Apache or Nginx access logs for unusual patterns in media upload endpoints (/wp-admin/async-upload.php)
  • Deploy endpoint detection solutions to identify unauthorized file access attempts on sensitive configuration files

Monitoring Recommendations

  • Enable verbose logging for WordPress's media upload functionality and XML processing operations
  • Configure alerts for outbound network connections initiated during media file processing
  • Monitor for unexpected DNS resolution requests that could indicate data exfiltration attempts
  • Audit user accounts with file upload privileges and review their upload activity regularly

How to Mitigate CVE-2021-29447

Immediate Actions Required

  • Update WordPress immediately to version 5.7.1 or later, which contains the security patch for this vulnerability
  • Verify that all WordPress installations using PHP 8 are running patched versions
  • Review and restrict user roles that have file upload capabilities to only those users who require them
  • Audit recent media uploads for suspicious file metadata or unusual file structures

Patch Information

WordPress has released version 5.7.1 which addresses CVE-2021-29447. Additionally, minor security releases have been published for older WordPress branches to provide backported fixes. It is strongly recommended to enable auto-updates for WordPress to ensure timely application of security patches. Debian users should apply the fixes documented in DSA-4896 and the Debian LTS Announcement. Official security updates are available through the WordPress Security Updates page.

Workarounds

  • If immediate patching is not possible, consider temporarily restricting file upload capabilities by modifying user roles
  • Implement additional server-level protections to disable external entity loading in PHP's XML parser configuration
  • Deploy a web application firewall with rules specifically designed to detect and block XXE attack payloads
  • Consider downgrading to PHP 7.x temporarily if upgrading WordPress is not immediately feasible (note: this is not recommended as a long-term solution)
bash
# PHP configuration to help mitigate XXE attacks
# Add to php.ini or relevant configuration file

# Disable loading of external entities (for PHP versions where applicable)
libxml.disable_external_entities = 1

# Restrict file upload handling
file_uploads = On
upload_max_filesize = 10M
max_file_uploads = 5

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

  • Vulnerability Details
  • TypeXXE

  • Vendor/TechWordpress

  • SeverityMEDIUM

  • CVSS Score6.5

  • EPSS Probability89.98%

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

  • Packet Storm Security Exploit

  • SonarSource Blog Analysis

  • GitHub Security Advisory

  • Debian LTS Announcement

  • Debian Security Advisory DSA-4896
  • Vendor Resources
  • WordPress Security Updates
  • Related CVEs
  • CVE-2025-14478: Demo Importer Plus WordPress XXE Flaw

  • CVE-2023-54359: WordPress Adivaha Travel Plugin SQLI Flaw

  • CVE-2023-54358: adivaha Travel Plugin XSS Vulnerability

  • CVE-2026-3005: WordPress List Category Posts XSS Flaw
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