Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-2025-1219

CVE-2025-1219: PHP DOM/SimpleXML Charset Vulnerability

CVE-2025-1219 is a charset parsing flaw in PHP DOM and SimpleXML extensions that causes incorrect content-type handling during HTTP redirects. This post covers the technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2025-1219 Overview

CVE-2025-1219 is an input validation vulnerability in PHP affecting the DOM and SimpleXML extensions. When requesting an HTTP resource that performs a redirect, the wrong content-type header is used to determine the charset for parsing the returned document. This improper handling can lead to documents being parsed incorrectly or security validations being bypassed, potentially enabling attackers to manipulate how applications process external XML or HTML content.

Critical Impact

Applications using PHP's DOM or SimpleXML extensions to fetch and parse remote resources may incorrectly handle character encoding after redirects, potentially leading to parsing errors or validation bypass that could enable injection attacks.

Affected Products

  • PHP 8.1.* before 8.1.32
  • PHP 8.2.* before 8.2.28
  • PHP 8.3.* before 8.3.19
  • PHP 8.4.* before 8.4.5

Discovery Timeline

  • 2025-03-30 - CVE-2025-1219 published to NVD
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2025-1219

Vulnerability Analysis

This vulnerability stems from improper handling of content-type headers during HTTP redirects in PHP's DOM and SimpleXML extensions. When an application requests an HTTP resource that returns a redirect response (e.g., 301, 302), the extension incorrectly uses the content-type header from the original response rather than the final redirected response to determine the character encoding for parsing.

This behavior can lead to charset mismatches where the document is parsed using an incorrect character encoding. Attackers can exploit this by controlling the redirect chain or the content-type headers returned at different stages of the redirect process.

Root Cause

The root cause is classified under CWE-1116 (Inaccurate Comments), though the practical impact relates to improper state management during HTTP redirect handling. The PHP extensions fail to properly track and update the content-type metadata when following HTTP redirects, instead retaining the charset information from an earlier response in the redirect chain rather than the final response containing the actual document content.

Attack Vector

The vulnerability is exploitable over the network and requires specific conditions to be met. An attacker would need to either:

  1. Control an intermediate redirect server that returns a crafted content-type header
  2. Manipulate the redirect chain to cause charset confusion between the original and final response

When a PHP application uses DOMDocument::loadHTML(), DOMDocument::load(), or SimpleXML functions to load remote content that performs a redirect, the attacker-controlled charset from the redirect response could override the legitimate charset declaration, causing the final document to be misinterpreted.

This could enable validation bypass scenarios where character encoding tricks are used to smuggle malicious content past security filters, or cause application logic errors due to incorrectly parsed XML/HTML structures.

Detection Methods for CVE-2025-1219

Indicators of Compromise

  • Unexpected HTTP redirect chains in application logs when fetching external XML/HTML resources
  • Character encoding mismatches or parsing errors in DOM/SimpleXML operations
  • Unusual content-type headers in HTTP responses involving redirects
  • Application behavior anomalies when processing external resources from untrusted sources

Detection Strategies

  • Monitor PHP application logs for DOM or SimpleXML parsing errors that occur after HTTP redirects
  • Implement logging around external resource fetching to track redirect chains and content-type headers
  • Review application code for usage of DOMDocument::load(), DOMDocument::loadHTML(), or SimpleXML functions with remote URLs
  • Deploy web application firewalls to detect unusual redirect patterns or content-type manipulation attempts

Monitoring Recommendations

  • Enable verbose logging for PHP DOM and SimpleXML extension operations in development and staging environments
  • Monitor for unexpected charset declarations in HTTP responses processed by PHP applications
  • Track redirect chains in applications that fetch external resources to identify potential manipulation
  • Implement application-level monitoring for XML/HTML parsing anomalies

How to Mitigate CVE-2025-1219

Immediate Actions Required

  • Upgrade PHP to version 8.1.32, 8.2.28, 8.3.19, or 8.4.5 depending on your installed branch
  • Review applications using DOM or SimpleXML extensions with remote URL loading capabilities
  • Consider implementing local content-type validation before parsing fetched resources
  • Restrict external resource fetching to trusted sources where possible

Patch Information

PHP has released security patches addressing this vulnerability across all affected version branches. The fix ensures that the correct content-type header from the final response in a redirect chain is used for charset determination. Detailed information is available in the PHP Security Advisory on GitHub.

Additional advisories have been published by Debian LTS and NetApp for their respective distributions.

Workarounds

  • Fetch remote content using cURL or other HTTP libraries with explicit charset handling before passing to DOM/SimpleXML
  • Explicitly set the encoding when loading documents rather than relying on content-type auto-detection
  • Implement application-level validation of content-type headers from final redirect responses
  • Avoid loading remote XML/HTML resources from untrusted sources until patches can be applied
bash
# Check current PHP version to determine if upgrade is needed
php -v

# For systems using apt (Debian/Ubuntu), update PHP packages
sudo apt update && sudo apt upgrade php*

# Verify the updated version after patching
php -v | head -1

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

  • Vulnerability Details
  • TypeOther

  • Vendor/TechPhp

  • SeverityMEDIUM

  • CVSS Score6.3

  • EPSS Probability0.02%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-1116
  • Technical References
  • Debian LTS Announcement

  • NetApp Security Advisory
  • Vendor Resources
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2024-8925: PHP Multipart Form Parsing Vulnerability

  • CVE-2025-1861: PHP HTTP Redirect Truncation Vulnerability

  • CVE-2025-1734: PHP HTTP Header Parsing Vulnerability

  • CVE-2025-22526: PHP/MySQL CPU Stats Object Injection 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