CVE-2026-129289 and CVE-2026-129496: request smuggling in PHP-FPM and memory corruption in the PHP timezone cache
CVE-2026-129289 (PHP-FPM request smuggling) and CVE-2026-129496 (timezone cache): two critical PHP flaws fixed on 19 November 2026. Conditions, checks, workarounds.

Context
On 19 November 2026 the PHP project released versions 8.5.13, 8.4.28, 8.3.37 and 8.2.36. They fix eighteen CVEs, seven of them rated critical. This article covers two.
CVE-2026-129289 is a request smuggling flaw in PHP-FPM. It allows PHP code to be executed on the server, without authentication and in a single request.
CVE-2026-129496 is a use-after-free in the timezone cache. One request is enough to crash a worker, and code execution has been demonstrated in a lab.
The two mechanisms are unrelated. We bring these flaws together because, in both cases, a server's exposure depends on its configuration and not on its PHP version alone. For the first, it is a directive on the front-end server. For the second, a message PHP writes to its log at startup.
The day before the release, PHP had warned that its critical issues required "either non-default configuration or uncommon setups". The wording is accurate. The configurations concerned are nonetheless widespread, as the following sections show.
We reproduced neither flaw. This article relies on both PHP advisories, on both fixes, on the nginx and Apache documentation and on the code of five PHP libraries.
Technical summary
CVE-2026-129289, request smuggling in PHP-FPM
| Item | Value |
|---|---|
| Identifiers | CVE-2026-129289, advisory GHSA-qc49-hpvq-g2w6 |
| Component | PHP request shutdown (main/SAPI.c) and FastCGI reading (main/fastcgi.c), reached via FPM |
| Class | CWE-444, inconsistent interpretation of HTTP requests (request smuggling); CWE-670 |
| Severity | Critical for PHP, CVSS 4.0 of 9.2. Red Hat: "Critical", CVSS 3.1 of 8.1 |
| CVSS 4.0 vector | AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| Affected versions | PHP before 8.2.36, 8.3.0 to 8.3.36, 8.4.0 to 8.4.27, 8.5.0 to 8.5.12; code present since 5.6.0 |
| Fixes | PHP 8.2.36, 8.3.37, 8.4.28 and 8.5.13 (19 November 2026); PHP 8.6.0 is not affected |
| Conditions | FastCGI connections reused by the front end, and an application opening php://input unread |
| Discovery | GitHub accounts sphl, DavidKorczynski and Aviral2642, credited by PHP |
| Exploitation | None reported as of 20 November; not in the KEV catalog (18 November edition) |
CVE-2026-129496, timezone cache
| Item | Value |
|---|---|
| Identifiers | CVE-2026-129496, advisory GHSA-gr4f-wgx5-jpfv |
| Component | Error log timestamping (main/main.c) and the date extension's cache |
| Class | CWE-416, use after free; CWE-459, incomplete cleanup |
| Severity | Critical for PHP, CVSS 4.0 of 9.2. Red Hat: "Critical", CVSS 3.1 of 8.1 |
| CVSS 4.0 vector | AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| Affected versions | PHP before 8.2.36, 8.3.37, 8.4.28 and 8.5.13; code present since 5.3.18 and 5.4.8 |
| Fixes | PHP 8.2.36, 8.3.37, 8.4.28 and 8.5.13 (19 November 2026) |
| Conditions | Non-thread-safe PHP, startup error written to a file by error_log, fresh worker |
| Discovery | GitHub accounts sebastianbergmann, kloylab, mbossard-wm and zeriyoshi, credited by PHP |
| Exploitation | None reported as of 20 November; public lab since 19 November; not in the KEV catalog |
Both flaws carry the same 9.2 score. They do not carry the same risk.
CISA rates the first as automatable and the second as not. We share that reading. The smuggling gives a deterministic result as soon as the conditions are met. For the timezone cache, crashing a worker is simple, but code execution requires knowing the process's memory addresses.
We would therefore handle CVE-2026-129289 first. How we triage this kind of advisory is described in our article on vulnerability prioritization.
Affected systems
The conditions of the two flaws are independent. A server can meet those of one, of the other, of both or of neither.
CVE-2026-129289: three conditions
PHP is served by PHP-FPM. The code execution chain goes through the FastCGI protocol. An Apache running PHP through mod_php is not affected, nor is the command line.
The advisory also mentions LSAPI, LiteSpeed's interface. The same defect can desynchronize requests there, but PHP does not establish code execution through it.
The front end keeps its connections open. By default, nginx and Apache open a connection to PHP-FPM for each request and close it afterwards. The attack does not work in that case. The advisory names three configurations where it does:
- nginx with
fastcgi_keep_conn on, a directive needed for the persistent connections of anupstreamblock (keepalive); - Apache
mod_proxy_fcgiwithenablereuse=on; - HAProxy, when its FastCGI application retains connections to the server.
These settings are common on high-traffic sites. Apache's documentation gives an example for PHP-FPM, and most nginx tuning guides recommend them.
The application opens php://input without reading it in full. This stream gives access to the raw request body. PHP only reads it on demand. If the application opens it and finishes without having read it, bytes from the body remain pending on the connection.
The advisory says that request frameworks create this stream before routing, without naming any. We looked at the code of five libraries.
| Library | Opening of php://input |
|---|---|
| Laminas Diactoros (Mezzio) | When the request is created, on every request |
| Slim PSR-7 | When the request is created, on every request |
| Nyholm PSR-7 Server | When the request is created, on every request |
| Guzzle PSR-7 | Deferred until the body is first read |
| Symfony HttpFoundation | Only if the application asks for the body |
The first three open the stream as soon as they build the request object. A route that never reads the body therefore leaves it open and unread. Symfony, and Laravel which builds on it, only open it if the code asks for the content.
This survey shows where to look first. It does not demonstrate that an application built on these libraries is exploitable: the attack also requires PHP's parsing of the body to stop at a precise point, which we did not test.
CVE-2026-129496: three conditions
The conditions come down to how PHP is built and configured. The application plays no part.
PHP is non-thread-safe. That is the case for PHP-FPM, for mod_php with the prefork MPM and for PHP-CGI, so for nearly every installation on Linux. Thread-safe builds are not affected.
PHP raises a message during its startup. It can be an error, a warning or a deprecation. The advisory cites an invalid date.timezone value and a warning caused by session configuration.
This case is frequent. After a version upgrade, a php.ini carried over as is often contains a removed or deprecated directive. The site works, and the message is appended to the log on every restart without anyone dealing with it.
That message is written to a file by PHP's error_log directive. PHP-FPM's own log is not enough, and sending to syslog does not go through the code at fault.
When these conditions are met, every worker is vulnerable from its creation to the end of its first request. Recycled workers go through that window again. A setting such as pm.max_requests therefore reopens it regularly.
How it works
This section draws on PHP's advisories and on our reading of the fixes. It stays at the advisories' level of detail.
CVE-2026-129289: a request body that is not discarded
FastCGI allows several requests to travel one after another over the same connection. Before accepting the next one, PHP must have consumed the whole body of the previous one, or close the connection.
PHP does this cleanup at the end of each request. Before the fix, it skipped it as soon as a php://input stream had been created, on the assumption that the body had then been read. But opening the stream reads nothing.
The fix, in main/SAPI.c, replaces an else if with an if:
if (SG(request_info).request_body) {
SG(request_info).request_body = NULL;
- } else if (SG(server_context)) {
+ }
+ if (SG(server_context)) {
if (!SG(post_read)) {
/* make sure we've consumed all request input data */A second change, in main/fastcgi.c, adds a guard. PHP-FPM now refuses a new request until the body of the previous one has been consumed, and closes the connection. This guard also protects against other paths that would leave a body unread.
CVE-2026-129289: from a leftover byte to code execution
The bytes left on the connection come from the request body, so from the attacker. PHP-FPM reads them as a new FastCGI request, which the front end neither built, nor filtered, nor logged.
Normally it is the front end that sets the FastCGI parameters. A forged request sets its own. The advisory describes three consequences:
- running an existing PHP script that the front end did not expose;
- a forged client address, for access controls that rely on it;
- changing PHP settings reserved for the administrator, which makes it possible to have attacker-supplied content executed as PHP code.
The technique behind the third is known. It has been used for years against PHP-FPM ports exposed to the Internet by mistake. This flaw makes it reachable over HTTP, through the front end.
The advisory states that the changed settings can remain active for later requests on the same worker. A single successful request can therefore affect the visitors who follow, until the process is recycled.
From an unread body to a forged FastCGI request
- 1
Reused connection
the front end asks PHP-FPM to keep the connection open after the request.
- 2
Stream opened, body unread
the application opens php://input and finishes without having read the whole body sent by the attacker.
- 3
Cleanup skipped
PHP wrongly considers the body handled and does not discard the remaining bytes.
- 4
Phantom request
PHP-FPM reads those bytes as a new FastCGI request, which the front end never issued.
Attacker's parameters
the forged request chooses the script and administrator-level PHP settings, and has its own content executed.
CVE-2026-129496: a cache freed too early
When PHP writes a line to its log file, it timestamps it in the configured timezone. For that, the date extension loads the timezone description and stores it in a cache.
If the write happens during PHP's startup, this cache is allocated in temporary memory, freed when startup ends. PHP nonetheless keeps a pointer to it. That pointer is only reset when the date extension initializes the first request.
Between the two, PHP is already parsing the request's data. If that parsing produces a warning, for instance because the request exceeds max_input_vars, PHP timestamps it with the freed cache. The corresponding memory may have been handed to the request's data.
The fix, in main/main.c, replaces nine lines with one:
-#ifdef ZTS
- if (!php_during_module_startup()) {
- error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 1);
- } else {
- error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 0);
- }
-#else
- error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 1);
-#endif
+ error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, PG(modules_activated) && EG(active));The removed lines explain why thread-safe builds are spared. PHP already avoided the local timezone during startup there. The fix extends that precaution to every build.
This fix has a visible effect for operators. PHP's startup and shutdown messages are now timestamped in UTC, while those of requests stay in the configured timezone. A log collector that assumes a single timezone will see those lines shifted.
CVE-2026-129496: what has been demonstrated
Remotely, an HTTP request crashes a PHP-FPM worker, with the default max_input_vars value and ordinary nginx header limits. The attack can be repeated on every fresh worker.
Code execution was demonstrated locally, under PHP-FPM and under mod_php, with memory addresses known in advance. The PHP-FPM chain also requires uncommon settings. The Apache one is less demanding.
PHP considers a remote ASLR bypass "plausible" and states that no complete one has been demonstrated.
A public lab appeared on GitHub on the evening of 19 November. According to its README, it obtains command execution on a php:8.4.27-apache image and fails on 8.4.28. Its author states that it reads the addresses from the process's memory map, from inside the lab. We did not run it.
What is still missing is a way to obtain those addresses remotely. That was also true of php2shell on 21 October, and working exploits were observed against honeypots a week later. We would not count on a longer delay.
Available fixes
Both flaws are fixed by the same versions and the same packages. Distributions backport without changing the upstream version number, so the package version has to be compared with the one in the advisory.
| Distribution | Status recorded on 20 November 2026 |
|---|---|
| PHP (sources) | 8.5.13, 8.4.28, 8.3.37, 8.2.36 |
| Debian 13 (trixie) | Fixed by php8.4 8.4.28-1~deb13u1 (DSA-6641-1) |
| Debian 12 (bookworm) | Fixed by php8.2 8.2.36-1~deb12u1 (DLA-4916-1) |
| Debian forky, sid | Vulnerable (8.4.27-1) |
| Ubuntu 22.04 to 26.10 | Awaiting triage, no fixed package; priority "medium" |
| Ubuntu 16.04, 18.04 | Fixed under Ubuntu Pro (php7.0 and php7.2) |
| Red Hat (RHEL 7 to 10) | Every PHP stream marked affected, no erratum; severity "Critical" |
php Docker images | 8.4.28-fpm tags and equivalents published on 19 November around 15 UTC |
On Ubuntu, only the two oldest releases were fixed when we checked, and only under Ubuntu Pro. We do not know why. This table will have changed within days.
For PHP 7.4, 8.0 and 8.1, we found no upstream backport. PHP had published some in October for php2shell. A server still on those branches therefore has, at this date, only the workarounds or its distribution's package.
A php:8.4-fpm image pulled before 19 November ships an affected version. A running container does not change image by itself.
Checking a machine
CVE-2026-129289
Under nginx, the first check concerns connection reuse:
nginx -T 2>/dev/null | grep -n -E 'fastcgi_keep_conn|keepalive 'With no result for fastcgi_keep_conn, the default off applies. Under Apache:
grep -R -n -i 'enablereuse' /etc/apache2 /etc/httpd 2>/dev/nullmod_proxy_fcgi does not reuse its connections by default. The usual Debian and Ubuntu configuration, a SetHandler pointing to the PHP-FPM socket, does not enable it.
The version is read from the PHP-FPM binary, which may differ from the command-line one:
php-fpm8.4 -v
dpkg -l 'php*-fpm' 2>/dev/nullThat leaves searching the application and its dependencies for places where php://input is opened:
grep -R -n --include='*.php' 'php://input' /var/www 2>/dev/nullCVE-2026-129496
Messages raised at PHP startup all end the same way, since they are not tied to any script:
grep -R -n 'in Unknown on line 0' /var/log/php* /var/log/apache2 /var/log/httpd 2>/dev/null | tail -20A line of that kind dated from the last restart points to a server that needs handling. The next step is to confirm where PHP logs and how it is built:
php-fpm8.4 -i 2>/dev/null | grep -E '^(error_log|log_errors|Thread Safety|date.timezone)'Thread Safety => disabled is the affected case. An error_log pointing to a file meets the third condition. The value syslog does not.
From outside
None of these conditions can be read remotely. Connection reuse is invisible to an HTTP client, and PHP's startup messages do not leave the server.
A probe would have to attempt the smuggling or crash a worker. We therefore offer no remote test for either flaw.
Remediation
- Turn off FastCGI connection reuse wherever it is active, without waiting for the update window.
- Fix PHP's startup errors found in the log.
- Update PHP to 8.5.13, 8.4.28, 8.3.37 or 8.2.36, or install the distribution's fixed package.
- Restart PHP-FPM or Apache. Reloading the configuration does not replace the binary in memory.
- Rebuild and redeploy container images based on an earlier version.
Workaround for CVE-2026-129289
PHP's advisory recommends closing the connection to PHP-FPM after each request. Under nginx:
fastcgi_keep_conn off;Under Apache, enablereuse=on has to be removed from the ProxyPass directives and Proxy blocks concerned.
The cost is one connection setup per request. It is negligible on a Unix socket and small on the local network. We would apply this measure everywhere, including on servers updated the same day.
The advisory also mentions reading php://input in full before every request ends, and advises against it as the sole measure. An error path or application shutdown can prevent that read.
Finally, a PHP-FPM port must not be reachable from an untrusted network, before or after the update.
Workaround for CVE-2026-129496
The advisory recommends removing the cause of the startup message. That means fixing the invalid or deprecated directive in php.ini, then restarting the PHP master process and all its workers. A simple reload is not enough, because workers inherit the parent process's state.
The advisory offers another option, which is to send errors to syslog:
error_log = syslogWe prefer the first measure, which also fixes a configuration defect. The second suits servers whose php.ini cannot be changed quickly.
The advisory does, however, rule out settings related to cookies or to request_order. They hinder the code execution demonstrations without closing the defect.
Looking for compromise
PHP has published no indicator of compromise for these two flaws.
CVE-2026-129289
The two signals below come from Upwind's lab tests, which we did not reproduce.
The forged request is processed by PHP-FPM without going through the front end as a request. It therefore appears in the PHP-FPM access log, when enabled, with no matching line in the nginx or Apache one. That log is declared with access.log in the pool configuration, and many installations do not have it.
Each attempt also left a PHP warning, "File Upload Mime headers garbled". This message also appears when a client sends a malformed form. What to look for is a tight series from one address.
grep -R 'File Upload Mime headers garbled' /var/log/php* /var/log/nginx /var/log/apache2 2>/dev/nullCVE-2026-129496
The signal is that of any memory corruption, namely workers that crash. PHP-FPM and Apache each record it in their log:
grep -E 'exited on signal 11|SIGSEGV' /var/log/php*-fpm.log 2>/dev/null
grep -E 'exit signal Segmentation fault' /var/log/apache2/error.log 2>/dev/nullA series of crashes after 19 November, on a server that writes a message at startup, should be set against the access logs of the same moment. The requests to look at are those carrying a very large number of parameters.
A single crash has other possible causes, and a successful exploitation does not necessarily leave one.
Where there is doubt
What follows an exploitation looks like any code execution by a PHP worker. Look for processes spawned by php-fpm for no reason, recent PHP files in writable directories and unexplained outbound connections.
We would restart PHP-FPM before investigating, since settings changed through CVE-2026-129289 can persist in a worker.
Timeline
The CVE-2026-129289 fix is dated 29 October in PHP's repository, three weeks before its publication. The CVE-2026-129496 fix is dated 15 November. The advisories do not give the dates of the reports.
Both defects are old. The first goes back to PHP 5.6.0, in August 2014, and the second to PHP 5.3.18 and 5.4.8, in 2012. Each is fixed by one line.
Among the four accounts credited for CVE-2026-129496 is that of Sebastian Bergmann, the author of PHPUnit. Four separate reports suggest that the defect was already being met as a crash. That is a guess on our part, which the advisory does not confirm.
CVE-2026-129289 and CVE-2026-129496 timeline
Origin
2012
PHP 5.3.18 and 5.4.8
the timezone cache code takes the form that CVE-2026-129496 fixes.
August 2014
PHP 5.6.0
lazy reading of php://input is introduced, with the faulty condition in end-of-request cleanup.
Fix
29 October 2026
CVE-2026-129289 fix
Jakub Zelenka writes the fix and its two tests, not published at that date.
15 November 2026
CVE-2026-129496 fix
Ilija Tovilo writes the fix, one line in main/main.c.
18 November 2026
Pre-announcement
PHP announces critical security releases for the next day, between 14 and 14.
Disclosure
19 November 2026, 14
Advisories and releases
publication of advisories GHSA-gr4f-wgx5-jpfv then GHSA-qc49-hpvq-g2w6, and of PHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36. The CVE records follow around 14.
19 November 2026, around 15
Docker images
the fixed php tags are online.
Aftermath
19 November 2026, 18
Public lab
a GitHub repository publishes a reproduction of CVE-2026-129496 on Apache, with addresses read inside the lab.
20 November 2026
Status at this date
Debian fixed, Ubuntu and Red Hat without packages, no exploitation reported, flaws absent from the KEV catalog.
The other critical fixes of 19 November
Five other advisories in the same release are rated critical. The same update fixes them.
CVE-2026-126714, named phpAfterShell by its discoverers, concerns session files. We cover it in a separate article.
CVE-2026-115560 also concerns sessions. It arises from a serialization format mismatch between two reads of the same session, and requires an exploitable object chain in the application.
CVE-2026-129182 and CVE-2026-129481 complete the October fix for CVE-2026-109619. PHP demonstrated memory corruption there, without code execution. We track them in the php2shell article.
CVE-2026-129474 concerns PHP 8.5 only. The php.ini-production file shipped with PHP already neutralizes it.
Knowing where PHP runs
These two advisories cannot be triaged by version. Two servers on the same PHP version can be one exposed and the other not, depending on one line of nginx configuration or one line of the startup log.
The useful inventory is therefore the one of configurations, which few teams keep up to date.
The PHP installations you do not administer also count: appliance consoles, applications shipped as containers by a vendor, hosting panels. For those, you have to wait for or request the vendor's advisory.
That list is kept current continuously, by inventorying your external attack surface.
Frequently asked questions about CVE-2026-129289 and CVE-2026-129496
What is CVE-2026-129289?
A request smuggling flaw in PHP-FPM. When an application opens php://input without reading the whole request body and the front end reuses its connection to PHP-FPM, the remaining bytes are interpreted as a new FastCGI request. An attacker with no account can thereby have PHP code executed with the worker's privileges.
What is CVE-2026-129496?
A use-after-free in PHP's timezone cache. When PHP writes an error to a log file during its startup, it keeps a pointer to a cache that has already been freed. A request that triggers a warning very early, on a fresh worker, uses that cache and crashes the worker. Code execution was obtained in a lab with known addresses.
Which PHP versions are affected?
For both flaws, every version before 8.2.36, 8.3.37, 8.4.28 and 8.5.13. Branches 8.1 and earlier, out of support, received no upstream fix. PHP 8.6.0 is not affected by CVE-2026-129289.
Is my server affected by CVE-2026-129289 with a default nginx configuration?
No, according to the advisory. By default, nginx closes the connection to PHP-FPM after each request (fastcgi_keep_conn off). The directive has to be set to on, which is generally done together with an upstream block and keepalive.
And with Apache?
mod_proxy_fcgi does not reuse its connections by default. Only an explicit enablereuse=on exposes the server. An Apache running PHP through mod_php does not use PHP-FPM and is not affected by CVE-2026-129289.
How do I know whether my server is exposed to CVE-2026-129496?
Search PHP's log file for messages raised at startup, which end with "in Unknown on line 0". If the log contains some, PHP is built without thread safety and error_log points to a file, the conditions are met.
Is there a workaround?
Yes, one per flaw, and both come from PHP's advisories. For CVE-2026-129289, disable FastCGI connection reuse on the front end. For CVE-2026-129496, fix the configuration errors that produce a message at PHP startup and restart it, or log to syslog. The update is still needed.
Are these flaws being exploited?
No exploitation has been reported as of 20 November 2026, and neither is in CISA's KEV catalog. We found no public exploit code for CVE-2026-129289. For CVE-2026-129496, a public lab reproduces code execution with memory addresses read on the spot.
Does a web application firewall protect me against CVE-2026-129289?
In part. Vendors are announcing rules for this flaw, useful while patching is under way. The forged request, however, sits in the body of an ordinary HTTP request, and a filter placed in front of the front end does not see what PHP-FPM receives. Turning off connection reuse is safer.
How does it relate to php2shell?
It does not, technically. php2shell covers two memory corruptions in PHP core, fixed on 21 October 2026. The 19 November release also fixes two paths that the php2shell fix had left open, as well as phpAfterShell.
Sources
- php-src, advisory GHSA-qc49-hpvq-g2w6, "PHP-FPM request smuggling through an unread HTTP request body"
- php-src, advisory GHSA-gr4f-wgx5-jpfv, "Timezone cache use-after-free can lead to remote code execution"
- php.net, PHP 8 changelog
- php.net, 2026 announcements, including "Upcoming Critical PHP Security Release" of 18 November
- php-src, commit c7a3015, "Fix GHSA-qc49-hpvq-g2w6: Drain unread request bodies"
- php-src, commit cb20015, "Fix GHSA-gr4f-wgx5-jpfv: DATEG(tzcache) use-after-free"
- CVE-2026-129289 record and CVE-2026-129496 record (cve.org)
- Repository abraxas/php-tzcache-rce, lab for CVE-2026-129496, of which we only read the README
- nginx,
fastcgi_keep_conndocumentation - Apache HTTP Server,
mod_proxy_fcgidocumentation - Debian, security tracker for CVE-2026-129289 and for CVE-2026-129496
- Ubuntu, CVE-2026-129289 record and CVE-2026-129496 record
- Red Hat, CVE-2026-129289 record and CVE-2026-129496 record
- Upwind, "PHP Critical Vulnerabilities: Affected Versions and Mitigations"
- Depthfirst, "phpAfterShell: From Interrupted Session Writes to Remote Code Execution"
- Wiz, "phpAfterShell and Critical PHP RCE Vulnerabilities"
- Ostorlab, "PHP-FPM Request Smuggling RCE, Fixed in 8.5.13"
- Laminas Diactoros,
ServerRequestFactory.php, Slim PSR-7,ServerRequestFactory.phpand Nyholm PSR-7 Server,ServerRequestCreator.php, for the opening ofphp://input - CISA, Known Exploited Vulnerabilities catalog
Let’s discuss your external exposure
Request a personalized Flawfence demo and discover your real exposure level.
