CVE-2026-6722: CWE-416 Use After Free in PHP Group PHP
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.
AI Analysis
Technical Summary
This vulnerability involves a use-after-free condition in the PHP SOAP extension's object deduplication mechanism. Specifically, when processing an apache:Map node with duplicate keys, the second entry overwrites the first in a temporary result map, freeing the original PHP object but leaving a stale pointer. Subsequent href references can copy this dangling pointer, and because PHP string allocations may reuse the freed memory, an attacker can exploit this to execute arbitrary code remotely. Affected PHP versions include 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 vulnerability is tracked as CWE-416 (Use After Free) and carries a CVSS 4.0 score of 9.5, reflecting its critical impact.
Potential Impact
Successful exploitation allows remote code execution by an attacker who can control the SOAP request body. This can lead to full compromise of the affected PHP environment. The vulnerability affects multiple recent PHP versions, increasing the potential attack surface. No known exploits in the wild have been reported at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since no official patch or remediation level is provided, users should monitor PHP Group advisories closely. Until a fix is available, consider disabling the SOAP extension if it is not required or applying other environment-specific mitigations to limit exposure to untrusted SOAP requests.
CVE-2026-6722: CWE-416 Use After Free in PHP Group PHP
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.
CVSS v4.0
Score 9.5critical
Affected software
pkg:github/php/php-srcRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability involves a use-after-free condition in the PHP SOAP extension's object deduplication mechanism. Specifically, when processing an apache:Map node with duplicate keys, the second entry overwrites the first in a temporary result map, freeing the original PHP object but leaving a stale pointer. Subsequent href references can copy this dangling pointer, and because PHP string allocations may reuse the freed memory, an attacker can exploit this to execute arbitrary code remotely. Affected PHP versions include 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 vulnerability is tracked as CWE-416 (Use After Free) and carries a CVSS 4.0 score of 9.5, reflecting its critical impact.
Potential Impact
Successful exploitation allows remote code execution by an attacker who can control the SOAP request body. This can lead to full compromise of the affected PHP environment. The vulnerability affects multiple recent PHP versions, increasing the potential attack surface. No known exploits in the wild have been reported at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since no official patch or remediation level is provided, users should monitor PHP Group advisories closely. Until a fix is available, consider disabling the SOAP extension if it is not required or applying other environment-specific mitigations to limit exposure to untrusted SOAP requests.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- php
- Date Reserved
- 2026-04-20T19:39:59.836Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a000b48cbff5d861022ac6b
Added to database: 05/10/2026, 04:36:24 UTC
Last enriched: 05/17/2026, 10:08:07 UTC
Last updated: 06/27/2026, 08:51:20 UTC
Views: 338
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.