Daily Tech Now

Daily News on AI, Big Tech, Linux, Security & Gadgets

PHP Security Update Fixes Critical PHP-FPM and Session Flaws in PHP 8.2 to 8.5

One crafted request can let an attacker run code on some PHP-FPM servers that keep FastCGI connections open between requests. That bug, CVE-2026-129289, is one of several critical flaws fixed in PHP 8.2.36, 8.3.37, 8.4.28 and 8.5.13, released on November 19, 2026. The PHP project’s news archive lists all four builds as security releases. A…

PHP security update table showing critical PHP-FPM and session vulnerabilities by PHP branch

One crafted request can let an attacker run code on some PHP-FPM servers that keep FastCGI connections open between requests. That bug, CVE-2026-129289, is one of several critical flaws fixed in PHP 8.2.36, 8.3.37, 8.4.28 and 8.5.13, released on November 19, 2026.

The PHP project’s news archive lists all four builds as security releases. A day earlier, the PHP security team warned that the critical issues “require either non-default configuration or uncommon setups.” That is reassuring for a basic install. Still, connection reuse and shared session storage are common on busy hosting servers.

What changes for you

Not every PHP branch carries the same risk. The GitHub security advisories for each bug list different affected versions. PHP 8.5 users get the largest set of critical fixes, while two bugs never reached PHP 8.2 or earlier 8.x branches.

Critical flaws by PHP branch

CVE What breaks Affected branches Code execution shown?
CVE-2026-129289 PHP-FPM request smuggling 8.2, 8.3, 8.4, 8.5 Yes, as the PHP-FPM worker
CVE-2026-115560 Session serializer mismatch 8.2, 8.3, 8.4, 8.5 (older releases may be affected) Yes, command execution reproduced in testing
CVE-2026-126714 Partly overwritten session files 8.2, 8.3, 8.4, 8.5 Not confirmed
CVE-2026-129474 Use-after-free in magic method backtraces 8.5 only Yes, on PHP 8.5
CVE-2026-129481 Use-after-free after interrupted session shutdown 8.3, 8.4, 8.5 No, memory corruption and crashes only
CVE-2026-129182 Use-after-free in fatal error backtraces 8.5 only No, crashes and memory corruption only
CVE-2026-129496 Use-after-free in the timezone cache Listed in the 8.5.13 changelog Changelog says it “can lead to remote code execution”

The first six advisories all carry a CVSS 4.0 score of 9.2. The same score does not mean the same danger, though. Each advisory lists different conditions, and only some of them include a working code execution chain.

Version support also shapes your options. The PHP project says PHP 8.1 and older no longer receive updates. PHP 8.2 reaches end of life on December 31, 2026, so 8.2.36 is one of its last releases. PHP 8.6.0 shipped the same day as a feature release, but the advisories list fixed versions only for the 8.2 to 8.5 branches.

How the PHP-FPM smuggling bug works

PHP-FPM runs PHP scripts for a front-end web server such as nginx or Apache. The advisory for CVE-2026-129289 explains that PHP could leave unread bytes from a request body on a reused connection. PHP-FPM could then treat those bytes as a brand-new FastCGI request.

That forged request skips the web server’s routing and checks. It can set values such as the script to run, the client IP address and admin-level PHP settings. With a known script path, an attacker can make PHP execute their own input as code. Changed settings can also stick for later requests on the same worker.

Two conditions must both be true:

  • The front end keeps backend connections open. The advisory names nginx with fastcgi_keep_conn on, Apache mod_proxy_fcgi with enablereuse=on, and HAProxy setups that retain FastCGI connections.
  • The application opens php://input without reading it to the end. Some frameworks do this before routing or login checks, even on endpoints that ignore the body.

Standard nginx and Apache setups that close the FastCGI connection after each request are not affected by the demonstrated attack. The same cleanup error also hits LSAPI, but the advisory says it does not establish code execution there. The flawed input handling dates back to PHP 5.6.0. The advisory also notes that the report “was submitted with AI assistance.”

Two session bugs, one flagged in October

Serializer mismatch (CVE-2026-115560)

PHP can store session data in several formats, called serializers. The CVE-2026-115560 advisory describes what happens when the session upload progress feature writes data in one format and PHP later reads it in another. Attacker-supplied bytes can then reach PHP’s object decoder.

The mismatch does not require a runtime settings change. It can appear when separate apps, FPM pools, virtual hosts or CLI jobs share one session store with different settings. Separate FPM pools do not automatically get separate session storage. For code execution, the reading app also needs a usable chain of classes, known as a gadget chain.

Researchers reproduced command execution with a Guzzle gadget on PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12. A Monolog 2.11.1 chain also worked. The PHP team first warned about this issue on October 23 and advised setting session.upload_progress.enabled=0.

The new releases turn session upload progress off by default. While the feature is on, PHP now rejects runtime changes to session settings. An explicit setting in your configuration still overrides the new default. The fix also does not force matching serializers across separate configurations.

Half-written session files (CVE-2026-126714)

PHP’s default files session handler wrote new data over the old file without clearing it first. The CVE-2026-126714 advisory says an interrupted write can leave new data followed by old leftovers. Crafted contents can then make PHP rebuild attacker-controlled objects. This code dates back to PHP 4.1.0. The fix empties the file before writing and stops if that fails.

Memory bugs left over from PHP2Shell

October’s PHP2Shell releases fixed two critical flaws, CVE-2026-109618 and CVE-2026-109619. Two November bugs show that cleanup work was not finished.

The CVE-2026-129481 advisory calls it an incomplete fix for CVE-2026-109619. A fatal error during session cleanup can leave a stale pointer for the next request on that worker. The CVE-2026-129182 advisory covers further scenarios found after PHP 8.5.12 shipped its October fix. Neither advisory shows code execution yet.

CVE-2026-129474 is different. Its advisory confirms remote code execution on PHP 8.5 when fatal_error_backtraces=1 and zend.exception_ignore_args=0. The demonstrated attack also needs usable memory addresses despite ASLR. A change in PHP 8.5.12 to how memory-limit failures are handled made the attack possible. The shipped php.ini-production file blocks this path. The advisory names Laravel facades and Magento guest shipping estimation as possible paths, but full attacks on them were not shown.

Real attacks on October’s flaws make these follow-ups worth taking seriously. Check Point Research reported active exploitation of PHP2Shell against its Security Gateways, chained with a local privilege escalation bug. Field Effect counted a couple of dozen compromised gateways in one region between October 30 and November 4. None of the November advisories we reviewed reports exploitation in the wild.

Other fixes in this release

The PHP 8.5.13 changelog lists 18 security entries in total. Beyond the critical bugs, they include:

  • A PHP-FPM epoll use-after-free that can lead to local privilege escalation (CVE-2026-129291).
  • A Phar OpenSSL signature bypass through an algorithm downgrade (CVE-2026-128090).
  • An out-of-bounds read and write in CGI PATH_INFO correction (CVE-2026-129538).
  • Cross-site scripting in the PHP-FPM status page (CVE-2026-129292).
  • Mixed-case HTTPS and FTPS URLs that can expose data in plaintext (CVE-2026-128064).
  • An update of the bundled uriparser library to version 1.0.3.

What to do now

  1. Upgrade and restart. Install 8.2.36, 8.3.37, 8.4.28 or 8.5.13, then restart every PHP-FPM pool and web server worker.
  2. Check connection reuse. Until you patch, keep nginx fastcgi_keep_conn off and Apache enablereuse off. Never expose PHP-FPM or LSAPI listeners to untrusted networks.
  3. Find explicit upload progress settings. Search php.ini, FPM pools, virtual hosts, app overrides and CLI jobs for session.upload_progress.enabled. If you do not need it, set it to 0 at the server level. Calling ini_set() from app code is too late.
  4. Match session formats. Every app that shares a session store must use the same session.serialize_handler. Otherwise, give each app its own storage.
  5. Harden PHP 8.5 error settings. Set zend.exception_ignore_args=1 or fatal_error_backtraces=0 in the configuration your workers actually load. Turning off display_errors does not help.
  6. Check vendor packages. As TechEnclave noted in October, Linux vendors may backport fixes without changing the visible version. Updating WordPress or plugins alone does not fix PHP itself.

For CVE-2026-129481, the advisory offers a costly stopgap: set pm.max_requests=1 in PHP-FPM. Disabling upload progress does not help with that bug.

What remains unclear

The advisory page for the timezone cache bug, CVE-2026-129496, was not available to us, so its conditions are unknown here. The PHP 8.6.0 announcement does not mention security fixes. Owners of PHP 8.1 and older servers must rely on distribution vendors or extended support firms. Finally, the session fix does not stop two differently configured apps from sharing one store. That job stays with server admins.

About the Author

Trang Nguyen Avatar

Leave a Reply

Your email address will not be published. Required fields are marked *