{"vuln_id":"GHSA-m33r-qmcv-p97q","aliases":["CVE-2026-7261"],"description":"SoapServer session-persisted object use-after-free via SOAP header fault","published_at":"2026-05-07T12:57:35Z","modified_at":"2026-05-07T12:57:35Z","first_seen_at":"2026-11-22T14:05:37.607167Z","severity":"medium","severity_source":"ghsa","cvss_score":6.3,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","cwe":[],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-m33r-qmcv-p97q"},"matched_alias":null,"items":[{"id":12640,"source":{"id":"gh-php-src","name":"PHP releases (GitHub php/php-src tags)"},"title":"GHSA-m33r-qmcv-p97q / CVE-2026-7261: SoapServer session-persisted object use-after-free via SOAP header fault","summary":"SoapServer session-persisted object use-after-free via SOAP header fault `SOAP_PERSISTENCE_SESSION` allows to persist the SOAP handler object between requests using the session storage. Normally the object is immediately released after `SoapServer::handle()`, unless this setting is specified. This differentiation happens with the `service->soap_class.persistence != SOAP_PERSISTENCE_SESSION` check. `soap.c` fails to account for this flag in two places: https://github.com/php/php-src/blob/0d9ff00394d9447992bb66ccb1cef3edf70576bd/ext/soap/soap.c#L1595 https://github.com/php/php-src/blob/0d9ff00394d9447992bb66ccb1cef3edf70576bd/ext/soap/soap.c#L1600 Both of them are failure cases when a handler function for a header node either returned `false` or threw an exception. When the session is written, the freed object will be read and written to the session storage, resulting in a use-after-free. Normally, a SOAP server will only handle one SOAP request per PHP request, so it's unlikely that the attacker will be able to control the freed memory segment, though it is not impossible. The following example demonstrates the use-after-free. ```php class SoapSrv { public function return() { return new SoapFault('Server', 'denied'); } public function hello() { return 'ok'; } } session_start(); $srv = new SoapServer(null, ['uri' => 'urn:a']); $srv->setClass('SoapSrv'); $srv->setPersistence(SOAP_PERSISTENCE_SESSION); $srv->handle(<< XML); ``` Affected packages: php:ext-soap Patched: ext-soap 8.2.31, ext-soap 8.3.31, ext-soap 8.4.21, ext-soap 8.5.6","url":"https://github.com/php/php-src/security/advisories/GHSA-m33r-qmcv-p97q","published_at":"2026-05-07T12:57:35Z","updated_at":"2026-05-07T12:57:35Z","fetched_at":"2026-11-22T14:05:37.431181Z","severity":"critical","cvss_score":9.8,"epss":0.00302,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"ext-soap","vuln_id":"CVE-2026-7261","vuln_ids":["CVE-2025-14179","CVE-2026-12184","CVE-2026-6104","CVE-2026-6722","CVE-2026-6735","CVE-2026-7258","CVE-2026-7259","CVE-2026-7261","CVE-2026-7262","CVE-2026-7263","CVE-2026-7568","GHSA-M33R-QMCV-P97Q"],"tags":["repo-advisory","php","security","repo:php/php-src","stack"],"cluster_id":11749,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/12640","html":"https://vulnwatch.ve1ve2.com/item/12640"}}]}