Description
Double free during DOM XML serialization.
The XML serializer of Dom\XMLDocument and Dom\HTMLDocument can share ownership of a generated namespace prefix between the namespace-prefix maps of an element and a descendant, so the prefix is used after being freed and then freed a second time. The document does not need to be malformed. An application that parses attacker-controlled XML or HTML with these classes and serializes it with saveXml() can be crashed, and repeated requests can cause denial of service. Code execution has not been demonstrated.
This issue affects PHP versions 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| PHP Group | PHP | 8.4.0 – < 8.4.28, 8.5.0 – < 8.5.13 | 8.4.28 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | php8.4 | No fix yet | — |
| Debian 13 | php8.4 | 8.4.28-1~deb13u1 | DSA-6641-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | php8.5 | No fix yet | — |
| Ubuntu 26.04 LTS | php8.5 | No fix yet | — |
| Ubuntu 24.04 LTS | php8.3 | No fix yet | — |
| Ubuntu 22.04 LTS | php8.1 | No fix yet | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | php7.4 | No fix yet | — |
| Ubuntu Pro 18.04 LTS | php7.2 | No fix yet | — |
| Ubuntu Pro 16.04 LTS | php7.0 | No fix yet | — |
| Ubuntu Pro 14.04 LTS | php5 | No fix yet | — |
AlmaLinux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux 10 | php8.4 +23 | 8.4.28-1.el10_3 | ALSA-2026:100821 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | php8 | 8.5.13-1.1 | openSUSE-SU-2026:12618-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | php84 | 8.4.28-r0 | — |
| Alpine v3.24 | php85 | 8.5.13-r0 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | php8.4 +27 | 8.4.28-1.amzn2023.0.1 | ALAS2023-2026-3507 |
| Amazon Linux 2023 | php8.5 +26 | 8.5.13-1.amzn2023.0.1 | ALAS2023-2026-3506 |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | php-8.4 +94 | 8.4.28-r0 | — |
| Wolfi rolling | php-8.5 +92 | 8.5.13-r0 | — |
| Wolfi rolling | php-8.6 +92 | 8.6.0-r0 | — |
Advisories 6
- ALSA-2026:100821 Critical: php8.4 security, bug fix, and enhancement update AlmaLinux Security Advisories · Nov 21, 2026
- openSUSE-SU-2026:12618-1 php8-8.5.13-1.1 on GA media SUSE / openSUSE Security Updates · Nov 20, 2026
- DSA-6641-1 php8.4 - security update Debian Security (DSA / DLA) · Nov 20, 2026
- WID-SEC-2026-4684 PHP: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 19, 2026
- ALAS2023-2026-3506 Critical: php8.5 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Nov 19, 2026
- ALAS2023-2026-3507 Critical: php8.4 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Nov 19, 2026