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 (CVE-2026-6722) involves a use-after-free condition in the PHP SOAP extension's object deduplication mechanism. Specifically, the mechanism stores pointers to PHP objects in a global map without incrementing their reference counts. When duplicate keys exist in an apache:Map node, the second entry overwrites the first in the temporary result map, freeing the original PHP object but leaving a stale pointer. Subsequent references to the freed node can copy the dangling pointer into the result, and since PHP string allocations may reclaim the freed memory, this can lead to remote code execution. The vulnerability affects PHP versions 8.2.* prior to 8.2.31, 8.3.* prior to 8.3.31, 8.4.* prior to 8.4.21, and 8.5.* prior to 8.5.6. Red Hat has issued security advisories and updates for their PHP packages to address this issue.
Potential Impact
Successful exploitation of this use-after-free vulnerability allows an attacker who can control the SOAP request body to execute arbitrary code remotely. This poses a critical security risk as it can lead to full system compromise without requiring authentication or user interaction. The CVSS 4.0 base score is 9.5, reflecting the high severity and potential impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Red Hat has released updated PHP packages that fix this vulnerability. Users of affected Red Hat Enterprise Linux versions should apply the security updates provided in RHSA-2026:23388 or later. Since this is not a cloud service, remediation requires applying the vendor-supplied patches. Patch status is confirmed by the Red Hat advisory. No alternative mitigations are specified in the advisory; applying the official update is the recommended action.
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability (CVE-2026-6722) involves a use-after-free condition in the PHP SOAP extension's object deduplication mechanism. Specifically, the mechanism stores pointers to PHP objects in a global map without incrementing their reference counts. When duplicate keys exist in an apache:Map node, the second entry overwrites the first in the temporary result map, freeing the original PHP object but leaving a stale pointer. Subsequent references to the freed node can copy the dangling pointer into the result, and since PHP string allocations may reclaim the freed memory, this can lead to remote code execution. The vulnerability affects PHP versions 8.2.* prior to 8.2.31, 8.3.* prior to 8.3.31, 8.4.* prior to 8.4.21, and 8.5.* prior to 8.5.6. Red Hat has issued security advisories and updates for their PHP packages to address this issue.
Potential Impact
Successful exploitation of this use-after-free vulnerability allows an attacker who can control the SOAP request body to execute arbitrary code remotely. This poses a critical security risk as it can lead to full system compromise without requiring authentication or user interaction. The CVSS 4.0 base score is 9.5, reflecting the high severity and potential impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Red Hat has released updated PHP packages that fix this vulnerability. Users of affected Red Hat Enterprise Linux versions should apply the security updates provided in RHSA-2026:23388 or later. Since this is not a cloud service, remediation requires applying the vendor-supplied patches. Patch status is confirmed by the Red Hat advisory. No alternative mitigations are specified in the advisory; applying the official update is the recommended action.
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
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2026-6722","vendor":"Red Hat"}]
Threat ID: 6a000b48cbff5d861022ac6b
Added to database: 05/10/2026, 04:36:24 UTC
Last enriched: 07/23/2026, 21:31:26 UTC
Last updated: 08/10/2026, 12:41:12 UTC
Views: 399
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.
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.