CVE-2026-129481: PHP Session Shutdown Use-After-Free
- Vendor
- PHP Group
CVE-2026-129481 is a heap use-after-free vulnerability in PHP's session extension caused by interrupted session shutdown. When a session starts, the extension records the executing script's filename. A fatal error in an application callback invoked during destruction of session variables, such as a user-defined stream wrapper's stream_close() callback, can interrupt cleanup and leave the filename pointer intact after request memory is freed. A subsequent request handled by the same worker can attempt to free the stale string, causing a worker crash or memory corruption. Exploitation requires the filename to reside in request-owned memory rather than persistent OPcache memory. The vulnerability is an incomplete fix for CVE-2026-109619 and affects PHP 8.3 releases before 8.3.37, PHP 8.4 releases before 8.4.28, and PHP 8.5 releases before 8.5.13.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can crash a reused PHP worker and disrupt request processing, or corrupt its heap memory. Memory errors and crashes have been demonstrated; code execution through this specific vulnerability has not. The triggering and subsequent requests need not belong to the same user or session, allowing the effects of corrupted worker state to cross request boundaries.
Mitigation
If you can’t patch tonight, do this now.
For PHP-FPM, set pm.max_requests=1 and restart workers to prevent the demonstrated cross-request sequence, accepting the performance overhead of replacing workers after every request. Avoid fatal errors in application callbacks invoked during session cleanup. Disabling session upload progress does not address this vulnerability. Enabling OPcache alone is not reliable protection because individual scripts may still execute without being cached. These measures do not replace patching.
Remediation
Patch, then assume compromise.
Upgrade to PHP 8.3.37, 8.4.28, or 8.5.13, or a later fixed release for the deployed branch. Vendor packages containing backported fixes are also suitable; verify the complete package revision against the applicable vendor advisory. The fix clears the recorded session filename and line number during session initialization and terminates the process if a module request-shutdown handler bails out, preventing reuse of partially cleaned-up worker state. Restart PHP-serving services so all workers load the patched runtime; rebuild and redeploy affected container images. Verify the runtime actually serving web requests rather than relying solely on the command-line PHP version.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Frequently asked questions
- Is CVE-2026-129481 exploited in the wild?
- As of Nov 24, 2026, Mallory has no reports of CVE-2026-129481 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-129481?
- As of Nov 24, 2026, Mallory has found no public exploit for CVE-2026-129481.
- Is there a patch for CVE-2026-129481?
- Upgrade to PHP 8.3.37, 8.4.28, or 8.5.13, or a later fixed release for the deployed branch. Vendor packages containing backported fixes are also suitable; verify the complete package revision against the applicable vendor advisory.
- What products are affected by CVE-2026-129481?
- PHP Group Php.
- How severe is CVE-2026-129481?
- CVE-2026-129481 has a CVSS v4 score of 9.2 (Critical) and an EPSS score of 3.5% (90th percentile) as of Nov 24, 2026.
Recent activity
200 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.