Vulnerability DatabaseCVE-2026-129501

CVE-2026-129501: 
PHP vulnerability analysis and mitigation

Overview

CVE-2026-129501 is a double free / use-after-free vulnerability in PHP's modern DOM XML serializer that can crash PHP processes and cause denial of service. It affects Dom\XMLDocument and Dom\HTMLDocument in PHP 8.4.0–8.4.27 and PHP 8.5.0–8.5.12. The flaw was published on November 19, 2026, with fixed versions 8.4.28 and 8.5.13 released simultaneously. It carries a CVSS v4.0 base score of 6.3 (Medium) (PHP Advisory).

Technical details

The root cause is improper copy-on-write handling in PHP's DOM XML serializer (CWE-415: Double Free; CWE-416: Use After Free). When Dom\XMLDocument or Dom\HTMLDocument serializes a document via saveXml(), it maintains a namespace-prefix map per element. The serializer can generate a synthetic namespace prefix for an attribute; when a descendant element copies the ancestor's map via copy-on-write, the copied pointers are incorrectly marked as "owned" rather than "borrowed." Destroying the descendant's map frees the generated prefix still referenced by the ancestor; a later sibling can then access the freed value, and destroying the ancestor's map frees the same allocation a second time. The fix marks generated-prefix pointers copied into descendant lists as borrowed. Critically, the triggering input does not need to be malformed — valid XML or HTML combining namespaced attributes, nested namespace declarations, and a later sibling is sufficient (PHP Advisory).

Impact

The primary demonstrated impact is memory corruption and PHP process crash (denial of service). An attacker who can supply attacker-controlled XML or HTML to an application that parses it with the modern DOM API and then calls saveXml() can crash the PHP worker process; repeated requests can exhaust the application's worker pool, causing sustained service unavailability. While corrupting ZendMM's free list may theoretically allow later allocations to alias, no confidentiality or integrity impact has been demonstrated, and code execution has not been achieved through realistic application code (PHP Advisory).

Exploitability

No public proof-of-concept exploit code or in-the-wild exploitation has been reported as of the disclosure date. The EPSS score is 0.0, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. The NVD SSVC assessment classifies exploitation as "none" and the vulnerability as not automatable, reflecting the requirement that the target application must both parse attacker-controlled XML/HTML with the modern DOM API and subsequently call saveXml() — a specific but not uncommon pattern (PHP Advisory, Feedly).

Exploitation steps

  1. Identify a target application: Find a PHP application running PHP 8.4.x < 8.4.28 or PHP 8.5.x < 8.5.13 that accepts user-supplied XML or HTML, parses it using Dom\XMLDocument or Dom\HTMLDocument, and then serializes the result with saveXml().
  2. Craft a triggering document: Construct a valid XML or HTML document that combines namespaced attributes, nested namespace declarations, and a later sibling element — this establishes the shared namespace-prefix map state without requiring malformed input.
  3. Submit the payload: Send the crafted document to the application endpoint that processes it (e.g., via HTTP POST with an XML/HTML body or file upload).
  4. Trigger the double free: When the application calls saveXml(), the serializer's copy-on-write path incorrectly marks copied prefix pointers as owned, causing a double free and PHP process crash.
  5. Repeat for DoS: Send repeated requests with the crafted payload to exhaust the PHP worker pool, resulting in sustained denial of service (PHP Advisory).

Indicators of compromise

  • Logs: PHP error logs (php_error.log, php-fpm.log) showing segmentation faults or "double free" / "heap corruption" messages originating from DOM serialization code; repeated PHP-FPM worker restarts in a short time window.
  • Process: Unexpected PHP worker process crashes (SIGSEGV, SIGABRT) correlated with requests that include XML or HTML bodies; PHP-FPM pool showing rapid worker churn.
  • Network: High volume of repeated HTTP requests to endpoints known to process XML/HTML input, particularly if those requests contain documents with complex namespace declarations and nested elements.

Mitigation and workarounds

Upgrade to PHP 8.4.28 or PHP 8.5.13, which contain the fix that marks generated-prefix pointers copied into descendant lists as borrowed rather than owned. As an interim workaround, avoid calling saveXml() on Dom\XMLDocument or Dom\HTMLDocument instances that process attacker-controlled input; for HTML documents where XML output is not required, saveHtml() avoids the affected XML serializer path. Process isolation and PHP-FPM worker restart limits can contain the impact of individual crashes but do not eliminate the vulnerability (PHP Advisory).

Community reactions

The vulnerability was covered by several security news outlets and community blogs shortly after disclosure on November 19, 2026, including Infosecurity Magazine, CyberSecurityNews, Patchstack (with a WordPress-specific focus), and dev.to community posts. Patchstack highlighted the relevance to WordPress environments that use PHP's DOM XML serialization. AlmaLinux published a security release notice for their PHP packages. Overall community sentiment treated this as a moderate-severity issue warranting prompt patching, with no reports of active exploitation driving urgency (Patchstack, Infosecurity Magazine).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

php8.2

Fixed

sid

php8.4: 8.4.28-2

Fixed

trixie

php8.4: 8.4.28-1~deb13u1

Fixed

Ubuntu

Fixed

bionic (esm-infra)

php7.2

Not Affected

devel

php8.5

Affected

focal (esm-infra)

php7.4

Not Affected

jammy

php8.1

Not Affected

noble

php8.3

Not Affected

resolute

php8.5: 8.5.4-0ubuntu1.6

Fixed

trusty (esm-infra-legacy)

php5

Not Affected

xenial (esm-infra-legacy)

php7.0

Not Affected

RHEL / CentOS

Fixed

RHEL 8

Not Affected

RHEL 9

php:8.4/php.src

Affected

RHEL 10

php8.4-0:8.4.28-1.el10_2.src

Fixed

Alpine

Fixed

edge

php84: 8.4.28-r0

Fixed

Source: This report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-104883HIGH7.2
  • PHP logoPHP
  • contao/core-bundle
NoYesNov 20, 2026
GHSA-vw9g-2c4c-g767MEDIUM6.8
  • PHP logoPHP
  • livewire/livewire
NoYesNov 21, 2026
CVE-2026-104882MEDIUM6.5
  • PHP logoPHP
  • cpe:2.3:a:contao:contao
NoYesNov 20, 2026
GHSA-2g6w-c7gx-fxj8MEDIUM5.4
  • PHP logoPHP
  • guzzlehttp/guzzle
NoYesNov 21, 2026
CVE-2026-104884MEDIUM5.4
  • PHP logoPHP
  • composer://contao/contao
NoYesNov 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management