CVE-2026-129496: PHP timezone cache use-after-free from a startup warning

ByLinuxtastic

November 30, 2026 #CVE, #PHP

On a non-thread-safe PHP build, a diagnostic written to a file-based error_log during module startup, such as a warning about an invalid date.timezone, caused the timezone cache to be allocated in start-up memory that was then freed while a reference to it was kept. A diagnostic raised early in the first request on that worker, such as the max_input_vars warning, then touched the freed cache: a use-after-free that the PHP Group says lets an unauthenticated attacker crash PHP-FPM, mod_php or CGI workers, with code execution demonstrated where memory addresses are known. It affects every current branch, but only where a start-up diagnostic goes to a file log. Upgrade to PHP 8.5.13, 8.4.28, 8.3.37 or 8.2.36 and restart PHP-FPM or Apache; if you cannot today, fix whatever is producing the start-up warning (most often an unset or invalid date.timezone) so none is written at module startup. The advisory for this one could not be read on 30 November; this page is built from the CVE record’s own description.

CVE-2026-129496 at a glance.

ComponentPHP, the date extension’s timezone cache (ext/date) in non-thread-safe builds, interacting with a file-based error_log at module startup; every distribution php package (the common FPM and CGI builds are non-thread-safe)
Affected versionsPHP 8.2 before 8.2.36, 8.3 before 8.3.37, 8.4 before 8.4.28 and 8.5 before 8.5.13; every unsupported branch is affected too. Only on non-thread-safe builds, and only where a diagnostic is written to a file-based error_log during module startup
Fixed inPHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36, released 19 November 2026 as a security release; distribution packages below. 8.2 leaves security support on 31 December 2026, so 8.2.36 is one of its last releases
SeverityCVSS 4.0 9.2 Critical (AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H) from the PHP Group, repeated by NVD. Red Hat Critical, CVSS 3.1 8.1 (AC:H, CWE-825); Ubuntu medium. CWE-416 use after free and CWE-459 incomplete cleanup
Exploited in the wildNot on CISA’s Known Exploited Vulnerabilities list as of 30 November 2026; CISA’s SSVC says no known exploitation, not automatable. EPSS: no score yet as of 29 November 2026
Who is exposedNon-thread-safe PHP (which is what PHP-FPM, CGI and the common mod_php packages are) configured so that something is logged to a file at module startup. The usual cause is an unset or invalid date.timezone, which makes PHP warn on the first date call and, in some builds, at startup; a session-configuration warning is another the advisory names. The second diagnostic, early in the first request, is one most applications produce for free, for example the max_input_vars warning. Thread-safe builds are outside the bug
PublishedCVE record, 19 November 2026 (credits Sebastian Bergmann, kloylab, mbossard-wm); the GHSA-gr4f-wgx5-jpfv advisory could not be read on 30 November 2026; this page built 30 November 2026, last updated 30 November 2026

What it is

PHP keeps a cache of parsed timezone data so that it does not re-read the timezone database on every date operation. The CVE record describes the fault precisely: on a non-thread-safe build, if a diagnostic is written to a file-based error_log while the date module is starting up, the cache ends up allocated in the memory used during start-up, and that memory is freed afterwards while a pointer to the cache is kept.

The dangling pointer does nothing until something reads the cache again. The record says a diagnostic “raised early in the first request of a worker, such as the max_input_vars warning” does exactly that, before the request has got far enough to reset the state. At that point the freed cache is read: a use-after-free, reachable by an unauthenticated request because the attacker only has to make the worker emit an early diagnostic, which crossing max_input_vars with enough POST fields does. The record says the result is a crash of the worker on FPM, mod_php or CGI, and that “arbitrary code execution may be possible and has been demonstrated with known memory addresses”. It is one of seven CVEs fixed in the PHP security release of 19 November 2026, which produced 8.5.13, 8.4.28, 8.3.37 and 8.2.36; all seven carry the same CVSS 4.0 score of 9.2 from the PHP Group, and this site covers each on its own page and lists the siblings under Related reading.

The two halves are a start-up log write and an early-request diagnostic, and the first is the one an operator can remove without code changes. A PHP that has a valid date.timezone set, and no other start-up warning going to a file log, does not allocate the cache in the doomed place. Because the dedicated advisory could not be retrieved, this page states only what the CVE record says and does not guess at the exact allocation path or a narrower workaround; the record and the fixed releases are the authority, and the source list points at the advisory for when it becomes reachable.

Who is affected on Linux

Each row is what the distribution’s own security tracker said on 30 November 2026; the link in the row is the tracker page, which will be newer than this one. This one affects every current branch, so the fix is in every distribution’s package set.

DistributionStatusFixed package
Debian bookworm, trixie, forkyFixedbookworm php8.2 8.2.36-1~deb12u1 (DLA-4916-1); trixie php8.4 8.4.28-1~deb13u1 (DSA-6641-1); forky and sid php8.4 8.4.28-3
Ubuntu 20.04 to 26.04 and ESMFixed (priority medium, USN-9185-1, 23 November 2026)jammy php8.1 8.1.2-1ubuntu2.29, noble php8.3 8.3.6-0ubuntu0.24.04.14, resolute php8.5 8.5.4-0ubuntu1.6, stonking php8.5 8.5.9-0ubuntu2.2; focal php7.4 7.4.3-4ubuntu2.29+esm6 and bionic php7.2 7.2.24-0ubuntu0.18.04.17+esm15 under ESM; xenial and trusty under ESM legacy
RHEL, Rocky, AlmaFixed (rated Critical, 8.1)RHEL 10.3 php8.4-8.4.28-1.el10_3 (RHSA-2026:100821) and php-8.3.37-1.el10_3 (RHSA-2026:102300); RHEL 9 php:8.2, php:8.3, php:8.4 streams (RHSA-2026:102261, 102226, 102255) and php-8.0.30-8.el9_9.2 (RHSA-2026:102297); RHEL 8 php:7.4 and php:8.2 (RHSA-2026:100991, 101276); RHEL 7 ELS php-5.4.16-48.el7_9; EUS/E4S errata of 21 to 25 November; Red Hat Hardened Images php-main-8.5.13 (RHSA-2026:101658)
Fedora, openSUSE, Arch, AlpineNot consultedtrackers not read for this page; SUSE lists SUSE-SU-2026:5389-1 and later errata for the batch
php.net tarballs, Docker php images, Remi and Sury repositories, anything you built yourselfAffected below the fixed versionsphp.net 8.5.13 / 8.4.28 / 8.3.37 / 8.2.36; Docker php image tags of the same names; unsupported branches (8.1 and older) carry the bug and get no fix

How to check

Three questions: is the running PHP older than the fix, is the build non-thread-safe, and is anything written to a file log at module startup. The last is the one you can act on without upgrading.

# 1. the versions that are installed and running (CLI and FPM can differ)
php -v | head -1
php-fpm8.4 -v 2>/dev/null || php-fpm -v 2>/dev/null | head -1
dpkg -l 'php8*' 2>/dev/null | grep '^ii' | awk '{print $2, $3}' ; rpm -qa 'php*' 2>/dev/null | head
ps -o pid,lstart,args -C php-fpm8.4 -C php-fpm -C php-fpm8.3 | head -3
# fixed: 8.5.13, 8.4.28, 8.3.37, 8.2.36 (distribution builds: compare with the table above)

# 2. thread safety and the error_log target
php -i | grep -E 'Thread Safety|^error_log|date\.timezone'
php-fpm8.4 -i 2>/dev/null | grep -E 'Thread Safety|error_log|date.timezone'

# 3. is a start-up diagnostic actually being written? (run the worker binary and watch its log)
php-fpm8.4 -t 2>&1 | tail                     # config test prints start-up warnings
grep -hE 'PHP (Warning|Notice).*(timezone|date\.timezone|session)' /var/log/php*-fpm.log /var/log/php_errors.log 2>/dev/null | tail

A fixed version in step 1 with worker start times after the upgrade means you are done. Thread Safety => disabled is the affected build (and is the normal one for FPM and CGI). An error_log pointing at a file, together with a start-up warning in step 3, especially a timezone or session one, is the precondition; a valid date.timezone and a clean start-up log mean the first half does not occur.

How to fix it

Upgrade PHP and restart the workers. All three major distributions had packages between 21 and 25 November.

# Debian / Ubuntu (the package name carries the branch: php8.2, php8.3, php8.4, php8.5)
apt update && apt install --only-upgrade 'php8.*'
# RHEL family (module streams: dnf module update php, or dnf update php8.4 on RHEL 10)
dnf update 'php*'
# Alpine
apk upgrade 'php8*'
# php.net tarballs, Docker images: 8.5.13 / 8.4.28 / 8.3.37 / 8.2.36 (or the image tags of the same names)

# a new build is not running until every worker is replaced
systemctl restart php8.4-fpm   # or php-fpm, php8.3-fpm ... ; mod_php: systemctl restart apache2 / httpd
php -v                                       # the CLI binary, must print the fixed version
php-fpm8.4 -v 2>/dev/null || php-fpm -v      # the FPM binary, same
ps -o pid,lstart,args -C php-fpm8.4 -C php-fpm | head -3   # start times must be after the upgrade

The interim step is to stop a diagnostic being written at module startup. The most common cause is date.timezone being unset or wrong, so set it to a valid zone; then confirm the start-up log is clean. This removes the first half of the precondition, which is the one in your control.

# set a valid timezone in the php.ini the workers load
date.timezone = Etc/UTC          # or your actual zone, e.g. Europe/London
systemctl restart php8.4-fpm     # and/or apache2 / httpd
# confirm no start-up warning is written
php-fpm8.4 -t 2>&1 | grep -iE 'warning|notice|timezone' || echo 'clean start-up'

Do not treat setting the timezone as a substitute for the upgrade; it removes the demonstrated trigger, but the underlying use-after-free is only closed by the fixed release, and another start-up diagnostic could reach it. Do not assume a thread-safe build makes you immune to the rest of the batch; it only takes you out of this one.

Sources

  • CVE-2026-129496 at CVE.org — the PHP Group CNA record (19 November 2026): the full technical description, affected ranges, CVSS 4.0 vector, CWEs and credits
  • GHSA-gr4f-wgx5-jpfv — the php-src security advisory the record cites, with the preconditions, the demonstrated impact and the workarounds (this advisory returned an error on 30 November 2026, so the facts above are taken from the CVE record; check the advisory when it is reachable)
  • NVD entry — Awaiting Analysis; the PHP Group’s 9.2 is the only score
  • PHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36 release announcements — “This is a security release”; the PHP 8 ChangeLog carries the per-release entries; supported versions for the branch dates
  • PHP manual: date/time configuration — the date.timezone directive whose absence produces the start-up warning
  • Distribution trackers: Debian · Ubuntu · RHEL · SUSE; USN-9185-1, DSA-6641-1, DLA-4916-1
  • EPSS — no score had been published for this CVE as of 29 November 2026

Related reading

This advisory page was assembled from the primary sources listed above on 30 November 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.