Dev.to Security 🔐 Cybersecurity 👁 0 📖 12 min read

A startup warning in your PHP error log can become RCE (CVE-2026-129496)

AI disclosure: this post was drafted with AI assistance and reviewed and edited by the Rokkhe team. Every claim was checked against the linked public sources as of 22 Nov 2026. What is known about CVE-2026-129496 (PHP t

AI disclosure: this post was drafted with AI assistance and reviewed and edited by the Rokkhe team. Every claim was checked against the linked public sources as of 22 Nov 2026.

What is known about CVE-2026-129496 (PHP timezone cache use-after-free) as of 22 Nov 2026, from the PHP Group advisory, Abraxas Labs' public loopback lab, and secondary sources. By the Rokkhe research team.

On 19 November 2026, the PHP Group published GitHub advisory GHSA-gr4f-wgx5-jpfv for CVE-2026-129496: a use-after-free in the date extension's timezone cache. A diagnostic written to a PHP file error_log during process startup can leave a freed cache pointer behind. An early diagnostic on a fresh worker's first request can then touch that freed memory. On affected configurations, an unauthenticated remote attacker can crash the worker and, in local proofs with known addresses, run code as the PHP worker (PHP Group, CVE record).

If you run PHP-FPM, Apache mod_php, or CGI on a non-thread-safe build with a file-based PHP error_log, this post is for you. We read the official advisory, the Abraxas Labs loopback proof of concept, Zend and Rapid7 entries, RescuePHP's defender write-up, Sebastian Bergmann's technical post, and SecurityWeek's patch roundup, and put the actionable parts in one place. Every claim links to where it came from. Where sources disagree, we say so. The short version: upgrade to 8.2.36 / 8.3.37 / 8.4.28 / 8.5.13 (or your distribution's patched package), restart the master and every worker, and until then clear the startup warnings that write through PHP's file error_log (or send errors to syslog).

Credit first. The PHP Group advisory credits reporters sebastianbergmann, kloylab, mbossard-wm and zeriyoshi, with remediation by iluuu1994 (Ilija Tovilo) and review by bukka (PHP Group, php-8.4.28 NEWS). Sebastian Bergmann also published a deep technical walkthrough, "The wrong crash" (phpunit.expert). Separately, Abraxas Labs published a public authorized loopback lab that proves native command execution on official php:8.4.27-apache and a clean miss on php:8.4.28-apache (Abraxas Labs). Contact listed on that repo: [email protected]. License: AGPL-3.0.

What happened

  • 19 Nov 2026. PHP shipped security releases that fix CVE-2026-129496 among other issues: 8.2.36, 8.3.37, 8.4.28, 8.5.13 (and SecurityWeek also notes PHP 8.6.0 in the same round) (PHP Group, SecurityWeek).
  • Same day, the advisory scored the issue Critical 9.2 on CVSS 4.0: CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N (PHP Group, Rapid7).
  • Weaknesses: CWE-416 (Use After Free) and CWE-459 (Incomplete Cleanup) (PHP Group).
  • Code inspection in the advisory places the affected pattern back to about PHP 5.3.18 / 5.4.8, with an earlier form in parts of the 5.2 and early 5.3 lines (PHP Group, RescuePHP).

How the bug works

PHP formats timestamps for file-based error log lines using the configured timezone. In a non-thread-safe build, that can go wrong at the boundary between module startup and the first request (PHP Group).

  1. A diagnostic during module startup (confirmed examples: an invalid date.timezone value, or a warning or deprecation from session configuration) is written through PHP's file error_log path. Formatting that timestamp allocates date_globals.tzcache on the temporary startup heap (PHP Group, Bergmann).
  2. Startup frees that heap. The internal pointer to the cache is not cleared there. Bergmann describes that incomplete cleanup as CWE-459 (Bergmann, PHP Group).
  3. Fresh FPM or Apache mod_php workers can inherit the stale pointer from the parent. The date extension resets the cache in request init (RINIT), but that reset can come after early request input handling has already logged another diagnostic (PHP Group, Bergmann).
  4. That early request diagnostic (the advisory's confirmed example is the warning when input exceeds max_input_vars) can then read or modify the freed hash table. By then the freed memory may already hold attacker-controlled request data (PHP Group).

Important boundaries from the advisory:

  • The startup diagnostic must be late enough that later initialization does not clear the cached reference (PHP Group).
  • The diagnostic must go through PHP's file error_log. FPM's own error log alone does not meet that condition (PHP Group, Abraxas Labs).
  • Thread-safe builds do not take the demonstrated path (PHP Group, Abraxas Labs).
  • The vulnerable window lasts until a worker completes its first normal request. Newly created or recycled workers can hit the same state again (PHP Group).
  • The issue has also been reproduced with CGI (PHP Group).

The fix formats those log timestamps in UTC outside a fully initialized active request, so request-local timezone state is not used at unsafe points in the lifecycle. Startup log lines may therefore show UTC times after the patch (PHP Group, RescuePHP, Bergmann).

Who is exposed

All of the following matter together (PHP Group, Zend, RescuePHP):

  1. An affected PHP build. Upstream fixed lines: before 8.2.36, 8.3 before 8.3.37, 8.4 before 8.4.28, 8.5 before 8.5.13 (PHP Group). Zend's product page also lists ZendPHP lines from 7.2 through 8.5 before their fixed ZendPHP builds, which matches extended support for older branches (Zend). RescuePHP reads the advisory's code-history note as meaning EOL 5.x / 7.x / unsupported 8.x installs are affected and will not get an upstream fix (RescuePHP).
  2. A non-thread-safe (NTS) build. That is the common case for PHP-FPM and most mod_php deployments (Zend, PHP Group).
  3. PHP error_log pointing at a file, so startup diagnostics take the file-timestamp path (PHP Group).
  4. A suitable startup diagnostic that is actually written (invalid date.timezone, session configuration warning or deprecation, and possibly other late startup messages) (PHP Group).
  5. An early request diagnostic on a fresh worker, such as exceeding max_input_vars, or (in the Apache cleanup path) request startup failing before the cache is reset (PHP Group).

Successful exploitation, as described by the PHP Group, does not require application-level code execution or attacker control of PHP_VALUE / PHP_ADMIN_VALUE (PHP Group).

What has been shown (and what has not)

Claim Status Source
Crash an FPM worker with a crafted request using default max_input_vars and ordinary nginx header limits Shown (advisory) PHP Group
Native command execution in FPM with known addresses (GET/COOKIE chain; needs extra config such as auto_globals_jit=0, cookies in request_order, large Authorization header) Shown locally (advisory) PHP Group
Native command execution in Apache mod_php via POST over memory_limit cleanup / post_deactivate destructor Shown locally (advisory + Abraxas lab) PHP Group, Abraxas Labs
Same request fails closed on 8.4.28 Lab-proven Abraxas Labs
Complete independent remote ASLR bypass Not demonstrated (advisory calls it plausible) PHP Group, Abraxas Labs
Listed in CISA KEV No as of Rapid7's entry and our 22 Nov 2026 check Rapid7, CISA KEV

Rapid7's vulnerability database entry lists CVSS 4.0 9.2, In CISA KEV Catalogue: False, EPSS score 8% (95th percentile) as recorded on that page (Rapid7). Treat EPSS as a prioritization hint, not proof of active campaigns.

The Abraxas Labs PoC (authorized loopback lab)

Abraxas Labs published php-tzcache-rce: a Docker Compose lab that compares vulnerable PHP 8.4.27 Apache against patched 8.4.28 on loopback only. It is not a one-packet blind remote exploit against an unknown host. Addresses come from the lab process maps (SYS_PTRACE / /proc maps). That matches the PHP Group's "known runtime addresses" condition (Abraxas Labs, PHP Group).

Lab pins (from the public README)

  • Images: php:8.4.27-apache vs php:8.4.28-apache
  • SAPI: apache2handler, mpm_prefork pinned to one worker
  • date.timezone=Not/AZone (startup diagnostic)
  • error_log=/var/log/php-error.log (file path)
  • memory_limit=2M
  • Large LimitRequestFieldSize for the Basic token the lab uses
  • SYS_PTRACE so the lab can read process maps
  • Architecture in that published run: aarch64
  • Ports: 127.0.0.1:18224 (vuln) vs 127.0.0.1:18225 (patched)
  • Compose project name: cve-2026-129496

(Abraxas Labs)

Chain this lab uses (defender summary)

Per the repo README and the advisory's Apache path:

  1. Startup file-log diagnostic allocates the timezone cache on temporary startup heap; the heap is freed; the pointer stays until first-request RINIT.
  2. The fresh prefork child inherits that stale pointer.
  3. Early HTTP Basic credential decoding is used to overlap the freed cache with a forged hashtable.
  4. A POST body larger than memory_limit aborts before RINIT clears the cache.
  5. Request cleanup / post_deactivate then invokes an attacker-controlled destructor, which runs a witness command (printf into /tmp/w) as www-data.

(Abraxas Labs, PHP Group)

The advisory also describes a max_input_vars crash path and an FPM GET/COOKIE path with different configuration (auto_globals_jit=0, cookies in request_order). Those are separate demonstrated conditions. We are not pasting exploit payloads, heap-forge bytes, Authorization token construction, or offsets here. For the full lab harness, clone the public repository under AGPL-3.0 (Abraxas Labs).

How to run the authorized lab

git clone https://github.com/abraxas/php-tzcache-rce
cd php-tzcache-rce
python3 php-tzcache-rce-Abraxas-Labs.py

Or:

cd lab && ./run.sh

What success looks like on 8.4.27:

  • Witness file content: CVE-2026-129496-RCE written as www-data
  • The vulnerable connection resets
  • Lab success line: SUCCESS CVE-2026-129496 rce=yes

On 8.4.28 with the same request:

  • HTTP 500
  • Witness file absent
  • Worker stays up

(Abraxas Labs)

Use this only on systems you own and authorize. The published harness talks to loopback. Do not point it at third-party hosts.

How to check if you are affected

Run these on each PHP host, container image, and managed platform you care about.

1. Version

php -v
php -r 'echo PHP_VERSION, PHP_EOL;'

Fixed upstream: 8.2.36+, 8.3.37+, 8.4.28+, 8.5.13+ (PHP Group). Distributions may backport without changing the marketing version string, so also check the full package version (Debian/Ubuntu dpkg-query, RHEL rpm -q, Alpine apk info -v, and your image digest).

2. SAPI and thread safety

php -i | grep -E '^(Server API|Thread Safety|error_log|date.timezone|memory_limit|max_input_vars)\s*=>'
php -r 'echo PHP_SAPI, " NTS=", (PHP_ZTS ? "no" : "yes"), PHP_EOL;'

Look for FPM, apache2handler, or cgi, and Thread Safety = disabled (NTS). Thread-safe builds avoid the demonstrated path (PHP Group).

3. Confirm error_log is a file

If error_log is a filesystem path, you are on the demonstrated trigger path. syslog is the interim alternative named by the advisory (PHP Group, RescuePHP).

4. Scan startup logs for the precondition

Restart the PHP master (FPM or Apache) and inspect the PHP error log before the first request. Look for lines labeled like PHP Startup and for:

  • Invalid date.timezone
  • Session configuration warnings or deprecations

RescuePHP's practical tip: a clean startup log is good hygiene and also removes the precondition for this bug (RescuePHP, Bergmann).

5. Inventory the quiet places

PHP is often bundled inside CMS appliances, shared hosting, containers, and vendor products. Check:

  • Compose / Kubernetes images that ship php-fpm or mod_php
  • Hosting control panels and "PHP selector" versions
  • Sidecar workers that recycle often (they recreate the fresh-worker window)

Fix and stopgaps

Fix (do this)

  1. Upgrade to PHP 8.2.36, 8.3.37, 8.4.28, or 8.5.13, or install your distribution / ZendPHP / vendor patched package (PHP Group, Zend).
  2. Restart the PHP-FPM master and every worker, or restart Apache for mod_php. A package install alone is not enough if old workers keep running (PHP Group, RescuePHP).
  3. Re-check php -v (and the package version) on the running workers, not only on a newly opened shell.

Stopgaps until you can upgrade

  1. Correct startup diagnostics, especially invalid date.timezone and session settings that warn or deprecate at startup, then restart the master and all workers (PHP Group, Zend).
  2. Send PHP errors to syslog (or another destination that does not use the file-timestamp path), which avoids the demonstrated trigger (PHP Group, RescuePHP).
  3. Do not treat changes to $_REQUEST or cookie settings as a complete mitigation. The advisory says they are not, because the demonstrated Apache cleanup path does not need those settings (PHP Group, RescuePHP).

None of the stopgaps replace the patch for long.

Checklist

  • [ ] Inventory every PHP runtime (hosts, containers, managed platforms, vendor appliances)
  • [ ] Confirm version vs 8.2.36 / 8.3.37 / 8.4.28 / 8.5.13 (or vendor backport)
  • [ ] Confirm NTS vs ZTS and SAPI (FPM / apache2handler / cgi)
  • [ ] Confirm whether error_log is a file
  • [ ] Restart PHP and scan the startup error log for PHP Startup warnings
  • [ ] Fix invalid date.timezone and session startup noise; restart again
  • [ ] Upgrade to a fixed build; restart master + all workers
  • [ ] Verify the running workers, not only the CLI binary on PATH
  • [ ] For EOL PHP you cannot patch upstream, plan an upgrade or vendor backport (RescuePHP, Zend)

FAQ

Is this "another php2shell"?
No. CISA's October 2026 PHP alert and KEV entries cover CVE-2026-109618 and CVE-2026-109619 ("php2shell"). CVE-2026-129496 is a separate timezone-cache use-after-free disclosed on 19 Nov 2026 (CISA, PHP Group). Do not confuse the two when tracking tickets.

Do I need Authentication headers or cookie settings for the bug to exist?
No. Those are conditions of some demonstrated exploit chains, not of the underlying memory-corruption flaw. Crash via max_input_vars was shown with ordinary limits. The Apache cleanup path does not need the cookie / auto_globals_jit changes (PHP Group).

Does ASLR save me?
ASLR stayed enabled in the published proofs. A remote ASLR bypass is described as plausible but not demonstrated. The Abraxas lab reads addresses from inside the lab. That is not the same as a blind internet exploit (PHP Group, Abraxas Labs).

Is it in CISA KEV?
Not as of Rapid7's listing and our 22 Nov 2026 check of the KEV catalog (Rapid7, CISA KEV). Re-check before you close the change window.

Where Rokkhe helps

We did not find this bug. The PHP Group reporters, Ilija Tovilo's fix, and Abraxas Labs' public lab did the hard public work. What we can do is help you get through the triage.

Inventory and config review. We map every PHP runtime you run (including containers and bundled stacks) to version, SAPI, NTS/ZTS, error_log destination, and startup-log noise.

Authorized verification. On systems you own and authorize, we confirm whether the fixed build is actually what the workers are running, and whether startup diagnostics still write through a file error_log. We do not fire public exploit chains at production without a written scope, and we will not guess.

Detection while you patch. Fresh-worker crashes, bursts of max_input_vars warnings, and PHP workers spawning unexpected shells are the sorts of signals worth watching while upgrades roll out. Our SOC can help tune those to your logs.

Book an evaluation

If you run PHP in production and want a second pair of eyes on your exposure this week, book an evaluation at rokkhe.com. Also see our recent notes on nginx2root and Java4Shell if those stacks are in the same environment.

Sources

Primary

Vendor and secondary analysis

Related context (not the same CVE)

Rokkhe SAS is based in Strasbourg, France. This post reflects public sources as of 22 Nov 2026 (Asia/Dhaka) and will be updated if KEV status, vendor packages, or exploitation reports change.

Disclosure: this post was drafted with AI assistance and reviewed and edited by the Rokkhe team. Every claim was checked against the linked public sources as of 22 Nov 2026. The Abraxas Labs exploit source is not reproduced here; defenders should clone the public repository for the authorized lab only.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.