If you run a SOAP endpoint in PHP, put this one near the top of your list.

At a glance

  • CVE: CVE-2026-6722
  • Severity: 9.8 (Critical) at NVD. PHP’s advisory scores it 9.4 on CVSS 4.0, so it’s near the top of the scale either way.
  • Affected: PHP 8.2 before 8.2.31, 8.3 before 8.3.31, 8.4 before 8.4.21, and 8.5 before 8.5.6, when the SOAP extension (ext-soap) processes a request an attacker can send.
  • Known exploited: No. It’s not on CISA’s KEV list.

What’s going on

PHP’s SOAP extension lets a SOAP message reuse one object in several places: you tag a node with an id, then point back to it elsewhere with href="#…". To make that work, PHP keeps a lookup table of the objects it has already decoded. The catch is that it stores them without holding its own reference, so it’s counting on something else to keep them alive.

An apache:Map (a key/value map type SOAP supports) can break that assumption. If the map contains the same key twice, the second entry overwrites the first, and the first object gets freed, but the lookup table still points at it. A later href to that object then hands your code a pointer to memory that’s already been freed. That’s a use-after-free, and PHP’s advisory says an attacker can reclaim that memory with strings they control and turn it into remote code execution.

So who’s at risk? Anyone running a PHP SoapServer that accepts requests from people you don’t fully trust. All it takes is control of the SOAP request body; no login is needed. If you don’t use SOAP at all, or the extension isn’t installed, you’re not affected. A quick php -m | grep -i soap tells you whether it’s loaded.

Timeline

  • Disclosed: 2026-05-07 (PHP’s advisory went public with the fixed releases)
  • Patch released: 2026-05-07 (PHP 8.2.31, 8.3.31, 8.4.21 and 8.5.6)
  • CVE published at NVD: 2026-05-10

== UPDATE ==

The May 2026 PHP releases close this, and patching is the only thing that really fixes it.

  • Patch available: Yep.
  • Fixed in: PHP 8.2.31, 8.3.31, 8.4.21, 8.5.6. Branches older than 8.2 are end of life and aren’t covered by PHP’s advisory, so you’ll need a distro backport or an upgrade.
  • How to apply: Update PHP through your package manager (or PHP distribution) to the fixed release or anything newer on your branch, then restart your web server and any PHP-FPM pools so every worker loads the new build. As of this write-up, the newest releases are 8.2.36, 8.3.37, 8.4.28 and 8.5.13, and they include later security fixes too. On RHEL and friends, Red Hat has shipped errata for its PHP packages (listed below); on other distros, install the distro’s security update.
  • If you can’t patch yet: PHP’s advisory doesn’t offer a workaround, but you can shrink the risk. If nothing on the server needs SOAP, disable the soap extension and restart PHP. If you do run a SOAP endpoint, limit who can reach it (an IP allowlist or authentication at your web server or proxy) until you’ve upgraded.

References