PHP-FPM use-after-free grants RCE
High risk · public exploit
Risk assessment
PHP before 8.2.36/8.3.37/8.4.28/8.5.13 timezone cache use-after-free lets unauthenticated attackers crash workers and potentially run code (CVSS 9.2). Update now.
What to do
Apply the latest security patches from the vendor. If patching is not immediately possible, review the mitigation steps in this advisory and monitor for exploitation attempts.
- No fixed version listed yet. Restrict exposure and watch the vendor advisory. NVD references
- Remediation and Mitigation in this advisory
Exploitation confirmed - public proof-of-concept - CVE-2026-129496 is a critical use-after-free in PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28, and 8.5.* before 8.5.13 that grants unauthenticated attackers a worker crash and, with known memory addresses, potential remote code execution. Patched releases are available for all four branches - update immediately.
Overview
CVE-2026-129496 is a timezone cache use-after-free that affects non-thread-safe PHP builds. The chain starts at module startup: a diagnostic written to a file-based error_log, such as an invalid date.timezone value or a session configuration warning, causes the timezone cache to be allocated in startup memory. That memory is freed while a reference to it is kept. A second diagnostic raised early in the first request of a worker, such as the max_input_vars warning, then accesses the freed cache.
The bug sits at the intersection of two unremarkable configuration conditions, which is why it can hide in production for a long time. Neither the startup diagnostic nor the request-time warning is unusual on its own. It is the sequence that matters.
Impact
On a vulnerable deployment, an unauthenticated remote attacker can crash PHP-FPM, Apache mod_php, or CGI workers with a crafted request - a straightforward denial of service that also interrupts legitimate traffic. More seriously, arbitrary code execution may be possible. A working demonstration against known memory addresses has been shown, which lowers the bar considerably on systems without address randomization or where an attacker can leak addresses. The CVSS score is 9.2, with attack complexity rated high and no privileges or user interaction required.
Remediation and Mitigation
Update PHP to 8.2.36, 8.3.37, 8.4.28, or 8.5.13 depending on your branch. This is the only complete fix.
If you cannot patch immediately:
- Confirm whether you run non-thread-safe (NTS) builds, which is the common case for PHP-FPM.
- Set a guaranteed-valid
date.timezonein php.ini so no startup diagnostic is written toerror_log. - Review php.ini for session and CLI settings that emit startup warnings.
- Place PHP-FPM behind a reverse proxy or WAF with rate limiting to reduce exposure to crafted request floods.
- Monitor PHP-FPM worker restarts and error logs for anomalous crash patterns.
Other PHP hardening work continues as usual; older memory-safety incidents have also drawn swift attention, as with Apache ActiveMQ CVE-2026-34197 added to CISA KEV catalo.
Security Insight
This bug is a reminder that PHP’s startup and early-request diagnostics still share mutable global state accumulated over decades of incremental changes. The conditions are mundane, which makes the vulnerability easy to miss during risk triage - engineers see configuration warnings, not a memory-safety issue. The high complexity rating understates the practical risk for internet-facing PHP pools, where one unauthenticated request per crashed worker is all an attacker needs.
Further Reading
Exploit references 2 PoC Show
Public PoC References
Unverified third-party code
These repositories are publicly listed on GitHub and have not been audited by Yazoul Security. They may contain malware, backdoors, destructive payloads, or operational security risks (telemetry, exfiltration). Treat them as hostile binaries. Inspect source before execution. Run only in isolated, disposable lab environments (offline VM, no credentials, no production data).
Authorized use only. This information is provided for defensive research, detection engineering, and patch validation. Using exploit code against systems you do not own or do not have explicit written permission to test is illegal in most jurisdictions and violates Yazoul's terms of use.
| Repository | Stars |
|---|---|
| abraxas/php-tzcache-rce CVE-2026-129496 - PHP - Critical: 9.2 - Remote - RCE - timezone cache use-after-free. No password. A startup warning logged to a file lets the next request run a command as the web worker. Lab pins 8. | ★ 2 |
| LLCForge/CVE-2026-129496 PHP DateTimeZone Cache Use-After-Free | ★ 0 |
Showing 2 of 2 known references. Source: nomi-sec/PoC-in-GitHub.
Get a Telegram alert when the next one lands: PHP advisories