CVE-2026-129506: PHP SOAP extension frees a document’s DTD while entity references still point into it

ByLinuxtastic

December 1, 2026 #CVE, #PHP

PHP’s SOAP extension, ext/soap, parses XML on both sides of a web-service call: a SoapServer parses the request, a SoapClient parses the response, and both parse the WSDL and any schema it imports. The extension frees a document’s DTD while attribute values in the same document can still refer to entities the DTD owned, and when they are read the extension reads freed memory. Removing the DTD also defeats the server’s rule that documents containing one are rejected. The PHP Group says “an unauthenticated remote attacker who can send a crafted request to a SOAP endpoint, or who controls a WSDL or schema document loaded by the application, can crash the PHP process”, and that memory disclosure and code execution “have not been confirmed”. Update to 8.5.13, 8.4.28, 8.3.37 or 8.2.36 and restart PHP-FPM; until then, reject XML with a DTD before it reaches the SOAP extension and load WSDLs only from sources you control.

CVE-2026-129506 at a glance.

ComponentPHP, the SOAP extension (ext/soap): SoapServer request parsing, SoapClient response parsing, and WSDL and schema loading in both
Affected versionsevery 8.x branch: 8.2 before 8.2.36, 8.3 before 8.3.37, 8.4 before 8.4.28, 8.5 before 8.5.13, per the PHP Group record; the advisory lists ext-soap from 8.2.0 in each branch. Builds without the SOAP extension are not affected
Fixed inPHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36, released 19 November 2026 as one security set (8.6.0 shipped the same day with the same fixes). Debian: 8.2.36-1~deb12u1 (DLA-4916-1) and 8.4.28-1~deb13u1 (DSA-6641-1); Ubuntu: USN-9185-1 of 23 November; Red Hat: RHSA-2026:100821, 101251, 102255, 101276 and 100991 (a backport to RHEL 8’s php:7.4 stream)
SeverityPHP Group (CNA) CVSS 4.0 6.3 Medium (AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L; the AT:P is the precondition that a SOAP endpoint or an attacker-influenced WSDL is in play), CWE-416 (use after free). Red Hat rates it Low, CVSS 3.1 5.3 (availability only) with CWE-825; SUSE rates it important at 5.3; Ubuntu Medium; NVD Awaiting Analysis with the CNA score only
Exploited in the wildNot on CISA’s Known Exploited Vulnerabilities list as of 1 December 2026 (catalogue 2026.11.30). EPSS 0.01938 (80.8th percentile) on 30 November 2026
Who is exposedAny PHP application that exposes a SoapServer endpoint to the network, and any application whose SoapClient talks to a server, or loads a WSDL or schema, that an attacker can influence. The outcome described is a crash of the worker: on PHP-FPM one process at a time, which the master respawns, so the practical effect is denial of service under repeated requests; on mod_php an Apache child. The advisory treats disclosure and code execution as unconfirmed rather than ruled out
PublishedPHP advisory GHSA-4646-p932-gw34 and CVE record 19 November 2026; this page built 1 December 2026, last updated 1 December 2026

What it is

A SOAP message is XML, and the SOAP extension hands it to libxml2 to parse before it walks the result. A document may carry a document type definition, and a DTD may declare entities, which attribute values elsewhere in the document can reference; libxml2 resolves those references lazily, so an attribute value can hold a pointer back into the DTD’s entity table. The extension frees the DTD early, before it has finished with the attributes, and the next read of such an attribute follows a pointer into freed memory. That is the use after free, CWE-416, and the reason the vector carries an availability impact and nothing confirmed beyond it: what sits in the freed block decides whether the process crashes or reads garbage.

There is a second consequence the advisory calls out. SoapServer is supposed to reject a request that contains a DTD at all, which is the usual defence against entity-expansion and external-entity tricks in SOAP. Because the DTD has been freed and detached by the time that rule runs, the rule sees no DTD and lets the document through. The fix keeps the DTD alive for the lifetime of the document and restores the rejection, which is why the advisory’s interim advice is to do that rejection yourself, in front of the extension, until the update is in.

The PHP Group scores it 6.3 under CVSS 4.0 and labels it Moderate; Red Hat reads the same bug as Low, 5.3, availability only, and SUSE as important at the same 5.3. The advisory credits NetKingJ with the report and bukka with the fix, and names no commit; the four fixed builds were released together on 19 November 2026 with seventeen other CVEs, three of which are the SOAP and DOM siblings linked below. The reporter’s own write-up and the PoC links in the record were not opened for this page.

Who is affected on Linux

Each row is what the distribution’s own security tracker said on 1 December 2026; the link in the row is the tracker page, which will be newer than this one. Every distribution that ships a supported PHP has a fixed package for this one.

DistributionStatusFixed package
AlpineNot consulted for this page; the Alpine tracker refused automated readers on earlier runs—
Debianphp8.2 bookworm fixed via DLA-4916-1; php8.4 trixie fixed via DSA-6641-1; forky and sid fixed at 8.4.28-38.2.36-1~deb12u1 (bookworm), 8.4.28-1~deb13u1 (trixie)
UbuntuPriority Medium; fixed on 22.04 (php8.1, a backport), 24.04 (php8.3), 26.04 and 26.10 (php8.5) by USN-9185-1 of 23 November 20268.1.2-1ubuntu2.29 (jammy), 8.3.6-0ubuntu0.24.04.14 (noble), 8.5.4-0ubuntu1.6 (26.04), 8.5.9-0ubuntu2.2 (26.10)
RHEL, Rocky, Alma, CentOS StreamLow, CVSS 3.1 5.3; errata RHSA-2026:100821 (RHEL 10.3 php8.4), 101251 and 102255 (RHEL 9 php:8.4), 101276 (RHEL 8 php:8.2), 100991 (RHEL 8 php:7.4), 101658 (Hardened Images); Bugzilla 2576605php8.4-8.4.28 (RHEL 10.3); the stream builds named in the errata
openSUSE/SLERated important, CVSS 3.1 5.3; overall state Pending; Liberty Linux 9 and 10 php8.4 >= 8.4.28; the SLE per-product rows were beyond the readable part of the pagephp8.4 8.4.28-1.module+el9.9.0 (Liberty 9), 8.4.28-1.el10_3 (Liberty 10)
php.net source builds, Docker php:* images, Remi and Ondřej Surý repositoriesThe upstream release applies; a container keeps the old PHP until the image is rebuiltPHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36

How to check

Three questions, in order: which PHP builds are installed and are they at the fixed versions; is the SOAP extension loaded at all; and is there a SoapServer endpoint or a SoapClient whose WSDL comes from outside. The first two are a minute’s work on the host; the third is a code search.

# 1. which PHP builds are installed, and are they at or above 8.5.13 / 8.4.28 / 8.3.37 / 8.2.36?
php -v | head -1
for b in /usr/bin/php8.* /usr/sbin/php-fpm8.* /opt/remi/php*/root/usr/bin/php; do [ -x "$b" ] && echo "$b: $($b -v 2>/dev/null | head -1)"; done
dpkg -l 'php8.*' 2>/dev/null | awk '/^ii/ {print $2, $3}'      # Debian/Ubuntu
rpm -qa 'php*' 2>/dev/null | sort                                # RHEL family, Remi

# 2. is ext/soap loaded in the CLI and in FPM?
php -m | grep -i '^soap$'
php-fpm8.4 -m 2>/dev/null | grep -i '^soap$'; php-fpm -m 2>/dev/null | grep -i '^soap$'
grep -rl 'extension=soap' /etc/php* 2>/dev/null

# 3. where the application uses SOAP, and whether the WSDL is a URL or a local file
grep -rnE 'new (\\)?Soap(Server|Client)\(' --include='*.php' /var/www /srv 2>/dev/null | head
grep -rnoE 'Soap(Server|Client)\((["\x27])(https?:)?//[^"\x27]+' --include='*.php' /var/www /srv 2>/dev/null | head

A build at or above 8.5.13, 8.4.28, 8.3.37 or 8.2.36, or a distribution package at the version in the table, is fixed. A build below that with no soap in step 2 has nothing reachable, since the extension is where the bug lives. A build below that with soap loaded and a SoapServer in step 3 is the exposed case; a SoapClient whose WSDL is a remote URL is the other one, because the WSDL and the responses are both parsed by the same code.

How to fix it

Update the package, then restart the process that serves PHP: PHP-FPM workers keep the old binary mapped until the pool is restarted, and mod_php keeps it until Apache is reloaded. The fixed builds are in every distribution named in the table, including a Red Hat backport to the RHEL 8 php:7.4 stream.

# Debian 12 / 13 (php8.2 8.2.36-1~deb12u1 via DLA-4916-1; php8.4 8.4.28-1~deb13u1 via DSA-6641-1)
sudo apt update && sudo apt install --only-upgrade 'php8.*'
# Ubuntu 22.04 / 24.04 / 26.04 / 26.10 (USN-9185-1, 23 November 2026)
sudo apt update && sudo apt install --only-upgrade 'php8.*'
# RHEL 8 / 9 / 10 and rebuilds (php:8.2 / php:8.4 module streams, php8.4 on RHEL 10)
sudo dnf update 'php*'
# then restart what runs PHP: FPM pools keep the old binary until they are restarted
sudo systemctl restart php8.4-fpm php8.3-fpm php8.2-fpm php-fpm 2>/dev/null; sudo systemctl reload apache2 httpd 2>/dev/null
# confirm the running version
php -v | head -1; curl -sI http://localhost/ | grep -i '^x-powered-by'

Where the update has to wait, the advisory’s interim advice is to refuse documents with a DTD before the SOAP extension sees them, restrict the SOAP endpoint to the clients that need it, and load WSDLs only from trusted sources. A check at the top of the endpoint script does the first of those without touching the extension:

<?php
// at the top of the SOAP endpoint script, before new SoapServer(...)
$raw = file_get_contents('php://input');
if (preg_match('/<!DOCTYPE/i', $raw)) {
    http_response_code(400);
    exit('Request rejected: documents with a DTD are not accepted');
}
// then hand $raw to the server with handle($raw) so it is not read twice

Two things not to do. Do not disable the SOAP extension as a “mitigation” on a host that serves a SOAP endpoint, since that is an outage rather than a fix, and the SoapClient side is the same code and does not go away. And do not rely on libxml_disable_entity_loader() or LIBXML_NOENT settings for this one: they govern how entities are resolved, not whether the DTD’s memory is kept alive, and the freed-DTD read happens regardless. The update is small and the restart is the only disruptive part.

Sources

  • CVE-2026-129506 at CVE.org — the PHP Group CNA record (19 November 2026): the description, the affected ranges per branch, the CVSS 4.0 vector and the CWE
  • GHSA-4646-p932-gw34 — the PHP project’s advisory: the mechanism, the ext-soap ranges, the four patched versions, the interim mitigations and the credit to NetKingJ and bukka; no fix commit is named
  • PHP 8 ChangeLog — the 19 November 2026 entries for 8.5.13 (and 8.6.0), which list this CVE among the eighteen fixed in the release set; the 8.4, 8.3 and 8.2 sections were beyond the readable part of the page on 1 December, so their build numbers are taken from the advisory
  • NVD entry — Awaiting Analysis; published 19 November; the CNA’s CVSS 4.0 6.3 and CWE-416; no NVD score and no cisaExploitAdd
  • Distribution trackers: Debian (DLA-4916-1, DSA-6641-1) · Ubuntu (Medium, USN-9185-1) · Red Hat (Low, 5.3, CWE-825, six errata) · SUSE (important, 5.3, Pending)
  • CISA KEV catalogue 2026.11.30, not listed · EPSS: 0.01938, 80.8th percentile, on 30 November 2026

Related reading

This advisory page was assembled from the primary sources listed above on 1 December 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.