CVE-2026-129496: PHP Timezone Cache Use-After-Free Leading to Remote Code Execution
- Vendor
- PHP Group
CVE-2026-129496 is a use-after-free vulnerability in PHP's ext-date timezone cache affecting non-thread-safe builds. A diagnostic written to PHP's file-based error log during module startup can allocate the timezone cache in startup memory that is subsequently freed while a reference remains. An early diagnostic during a worker's first request, before request initialization resets the cache, can dereference the freed memory. PHP-FPM and Apache mod_php workers can inherit the stale reference from their parent, and CGI workers are also affected. Crafted unauthenticated requests can crash workers and potentially execute arbitrary code. Affected upstream versions include PHP before 8.2.36, PHP 8.3 before 8.3.37, PHP 8.4 before 8.4.28, and PHP 8.5 before 8.5.13. Older vendor-maintained branches also require applicable backported fixes.
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.
Unauthenticated remote exploitation can cause memory corruption and crash PHP-FPM, Apache mod_php, or CGI workers, disrupting application availability. Arbitrary code execution with PHP worker privileges is possible under additional memory-layout conditions, potentially compromising data and functionality accessible to that account. Code-execution proofs succeeded with known runtime addresses and configuration and heap-layout assumptions. Although ASLR remained enabled, a complete independent remote ASLR bypass was not demonstrated. Newly created or recycled workers remain exposed until they complete their first normal request.
Mitigation
If you can’t patch tonight, do this now.
Correct configuration errors and deprecated settings that generate module-startup diagnostics, including invalid date.timezone values and problematic session settings, then restart the PHP master process and all workers to remove inherited stale state. Alternatively, direct PHP errors to a suitable logging destination such as syslog that avoids the vulnerable file-based timestamp-formatting path. FPM's own error log alone does not satisfy the trigger condition. Changes to cookie handling, request_order, or auto_globals_jit are not complete mitigations because the demonstrated Apache cleanup path does not require those settings.
Remediation
Patch, then assume compromise.
Upgrade to PHP 8.2.36, 8.3.37, 8.4.28, or 8.5.13 for the corresponding branch, or a later supported fixed release. For distribution-maintained or extended-support packages, install the vendor release containing the backported fix rather than judging patch status solely by the upstream version. Migrate unsupported installations to a supported fixed branch. Restart PHP-serving services after updating so the master process and all workers use the fixed code. The fix formats error-log timestamps in UTC outside a fully initialized active request, avoiding unsafe access to request-local timezone state.
Exploits
2 exploits validated by Mallory's analysis. Hidden: 3 rejected by Mallory's analysis as not a working exploit.
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-129496 exploited in the wild?
- As of Nov 24, 2026, Mallory has no reports of CVE-2026-129496 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-129496?
- Yes. Mallory tracks 2 public exploits or proofs of concept for CVE-2026-129496, the earliest disclosed Nov 19, 2026.
- Is there a patch for CVE-2026-129496?
- Upgrade to PHP 8.2.36, 8.3.37, 8.4.28, or 8.5.13 for the corresponding branch, or a later supported fixed release. For distribution-maintained or extended-support packages, install the vendor release containing the backported fix rather than judging patch status solely by the upstream version.
- What products are affected by CVE-2026-129496?
- PHP Group Php.
- How severe is CVE-2026-129496?
- CVE-2026-129496 has a CVSS v4 score of 9.2 (Critical) and an EPSS score of 8.1% (95th percentile) as of Nov 24, 2026.
Recent activity
267 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.