CVE-2026-129481 - Use-After-Free Vulnerability in PHP
A critical vulnerability in PHP may lead to memory failures and server crashes.

// on this page (8)
Introduction
The CVE-2026-129481 vulnerability is a critical flaw in PHP that can result in memory issues and server crashes. This vulnerability is related to a use-after-free behavior that occurs during interrupted session shutdowns.
What happened?
When a session starts in PHP, the system records the filename of the executing script. If a fatal error occurs during the execution of a callback function while session variables are being destroyed, the pointer to the filename may be retained even after the request memory is freed. This can lead to a situation where a subsequent request, handled by the same worker, may free a stale string, resulting in memory corruption or worker crashes.
How the vulnerability works
The vulnerability occurs when PHP fails to properly free the memory associated with an interrupted session. If a script is not cached by OPcache, the filename is allocated in request memory. An attacker who can trigger a failing cleanup may crash the worker or corrupt memory, although code execution has not been demonstrated.
What is the real impact?
The impact of this vulnerability is considered critical, as it can lead to server crashes and service interruptions. Although code execution has not been demonstrated, the possibility of memory corruption poses a significant risk to the stability and security of running PHP applications.
Which versions are affected?
- PHP 8.3.* before 8.3.37
- PHP 8.4.* before 8.4.28
- PHP 8.5.* before 8.5.13
How to fix
- Check the version of PHP running on your server.
- Upgrade PHP to a patched version that is not affected by the vulnerability.
- Consider implementing regression tests to ensure that the update does not introduce new issues.
- Monitor server logs for any anomalous behavior after the update.
Mitigation until you update
While it is not possible to upgrade to a patched version, it is recommended to:
- Avoid using scripts that may trigger fatal errors during session handling.
- Implement defensive programming practices to minimize the likelihood of failures.
- Monitor server performance and be alert for any failures or unexpected behavior.
Conclusion
The CVE-2026-129481 vulnerability poses a significant risk to PHP applications. It is crucial for system administrators and developers to take steps to update their PHP versions and mitigate the associated risks until a full upgrade can be performed.
// Fontes
- NVD — CVE-2026-129481 nvd.nist.gov ↗
- CVE.org — CVE-2026-129481 cve.org ↗
- GitHub github.com ↗