When a PHP session starts, the engine records the filename of the running script in a global. Session shutdown destroys the session variables first, and destroying them can run application code, such as the stream_close() of a user-defined stream wrapper. If a fatal error happened in that code, shutdown stopped before the recorded filename was freed, and the stale pointer survived into the next request on the same PHP-FPM worker, where a later session start or module shutdown could free it a second time: a use-after-free. The PHP Group rates it 9.2 but says code execution has not been demonstrated, and Red Hat rates it Important rather than Critical. It is the incomplete-fix follow-up to October’s CVE-2026-109619, and it affects PHP 8.3 and later. Upgrade to PHP 8.5.13, 8.4.28 or 8.3.37 and restart PHP-FPM; if you cannot today, avoid fatal errors in callbacks that run during session cleanup. PHP 8.2 is not affected.
CVE-2026-129481 at a glance.
| Component | PHP 8.3 and later, the session extension: the recorded script filename and interrupted session shutdown; the distribution php8.3, php8.4 and php8.5 packages |
| Affected versions | PHP 8.3 before 8.3.37, 8.4 before 8.4.28 and 8.5 before 8.5.13. The advisory and Debian say 8.2 is not affected (“only affects PHP 8.3 and later”); it is described as an incomplete fix for CVE-2026-109619 |
| Fixed in | PHP 8.5.13, 8.4.28 and 8.3.37, released 19 November 2026 as a security release; distribution packages below. The fix clears the recorded filename and line at session init, and terminates the process if a module’s request-shutdown handler bails out. 8.2.36 was released in the same batch for the other CVEs but is not a fix for this one |
| Severity | CVSS 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 Important (the one CVE in this batch it does not rate Critical), CVSS 3.1 8.1 (CWE-825); Ubuntu medium. CWE-416 use after free and CWE-459 incomplete cleanup |
| Exploited in the wild | Not 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 exposed | PHP-FPM workers running 8.3 or later where a session is in use, a user-defined stream wrapper or similar object is held in the session, and a fatal error can occur in its cleanup callback. The advisory’s reproducer is FPM with OPcache disabled, because the recorded filename has to be in request memory (OPcache would keep it elsewhere), and a stream resource held in the session; it adds that OPcache alone is not a reliable mitigation. The requests must reach the same worker, but not the same user or session |
| Published | CVE record and GHSA-g3vh-838c-65v7, 19 November 2026 (credits Saad Fellahi and Bryan Porras; the advisory notes the report was submitted with AI assistance); this page built 30 November 2026, last updated 30 November 2026 |
What it is
session_start() records the filename of the executing script in a global that the session extension uses for its own bookkeeping. At the end of the request, session shutdown destroys $_SESSION, and destroying it can call back into application code: the destructor of an object stored in the session, or the stream_close() method of a user-defined stream wrapper that a session value holds.
If that callback raises a fatal error, shutdown is aborted part-way, before the code that would have freed the recorded filename runs. The worker does not exit; it goes on to the next request. The advisory’s finding is that the next request does not reset the field either, so the stale pointer is still there, and a later session_start() or the module shutdown at the end of that request can free the string it points at, even if the next script uses no session functions at all. That is a use-after-free of a pointer into the previous request’s freed memory. The advisory says it can crash or corrupt the reused worker and that code execution through this field has not been demonstrated, which is why Red Hat alone in this batch rates it Important. 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.
It is explicitly an incomplete fix for CVE-2026-109619, the October advisory about session state surviving into a later request; the family is the same, and the fix finishes the job by clearing the recorded filename and line at session init and by terminating the process if a request-shutdown handler bails out rather than letting the worker carry a half-torn-down state forward. 8.2 is not in the affected range because the vulnerable field is not present there.
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. 8.2 is not affected, so Debian’s bookworm php8.2 is marked not-affected even though it was rebuilt for the rest of the batch.
| Distribution | Status | Fixed package |
|---|---|---|
| Debian bookworm, trixie, forky | Fixed where affected; php8.2 not affected | trixie php8.4 8.4.28-1~deb13u1 (DSA-6641-1), forky and sid php8.4 8.4.28-3; bookworm php8.2 marked not-affected (“only affects PHP 8.3 and later”) |
| Ubuntu 20.04 to 26.04 and ESM | Fixed (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 |
| RHEL, Rocky, Alma | Fixed where affected (rated Important, 8.1); 8.2 and older not affected | RHEL 10.3 php8.4-8.4.28 (RHSA-2026:100821) and php-8.3.37 (RHSA-2026:102300); RHEL 9 php:8.3 and php:8.4 (RHSA-2026:102226, 102255); EUS errata of 21 to 24 November; Hardened Images php-main-8.5.13 (RHSA-2026:101658). RHEL 7, 8 and 9 php 8.2-and-older streams marked not affected |
| Fedora, openSUSE, Arch, Alpine | Not consulted | trackers 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 yourself | Affected below the fixed versions | php.net 8.5.13 / 8.4.28 / 8.3.37; Docker php image tags of the same names; 8.2 is not affected, and unsupported branches below 8.3 are not in range |
How to check
Three questions: is a PHP 8.3+ build older than the fix serving requests, does an application hold stream wrappers or objects with cleanup callbacks in the session, and can those callbacks fail fatally. The first clears 8.2 outright.
# 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. sessions storing objects / stream resources, and user-defined stream wrappers
grep -rnE 'stream_wrapper_register|class .* \{[^}]*function stream_close' /var/www /srv --include='*.php' 2>/dev/null | head
grep -rnE "\$_SESSION\[[^]]*\]\s*=\s*(fopen|new )" /var/www /srv --include='*.php' 2>/dev/null | head
# 3. is OPcache on? (the reproducer needs it off; its presence is not a reliable mitigation)
php-fpm8.4 -i 2>/dev/null | grep -E 'opcache.enable|opcache.enable_cli'
php -i | grep -E 'opcache.enable'A fixed version in step 1 with worker start times after the upgrade means you are done. Step 2 printing stream-wrapper registration or session values that hold resources is the shape the advisory needs; most applications store only scalars and arrays in the session and do not. opcache.enable => On makes the demonstrated reproducer harder but, in the advisory’s words, is not a reliable mitigation, so it is not a reason to defer the upgrade.
How to fix it
Upgrade PHP 8.3, 8.4 or 8.5 and restart PHP-FPM. All three major distributions had packages by 24 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 upgradeThere is no clean configuration switch for this one. The advisory’s interim advice is to avoid fatal errors in callbacks reached during session cleanup, which is an application concern, and, for FPM, to set pm.max_requests=1 so no worker handles a second request and the stale pointer never carries forward. That recycles a worker after every request at a real performance cost, so it is a stop-gap until the upgrade, not a setting to leave on.
# FPM stop-gap: recycle each worker after one request (performance cost; remove after upgrading)
# in the pool config, e.g. /etc/php/8.4/fpm/pool.d/www.conf
pm.max_requests = 1
systemctl restart php8.4-fpm
php-fpm8.4 -tt 2>&1 | grep -i max_requests || grep -rn 'pm.max_requests' /etc/php/*/fpm/pool.d/ 2>/dev/nullDo not rely on OPcache as the mitigation; the advisory says plainly that it is not a reliable one, and the reproducer only disables it to make the memory layout predictable. Do not leave pm.max_requests=1 in place after upgrading; it defeats the point of persistent workers and was only ever a way to deny the bug its second request.
Sources
- CVE-2026-129481 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-g3vh-838c-65v7 — the php-src security advisory the record cites, with the preconditions, the demonstrated impact and the workarounds
- 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
- CVE-2026-109619: PHP global state points at freed request memory, allowing remote code execution on this site — the October advisory this one completes the fix for, with the original stale-global mechanism
- 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
- CVE-2026-109619: PHP global state points at freed request memory, allowing remote code execution — the October advisory this is the incomplete-fix follow-up to: global state pointing at freed request memory
- CVE-2026-129182: PHP fatal-error backtrace repopulated after shutdown — the fatal-error-backtrace repopulation bug, the other shutdown-time stale-state bug in this release
- CVE-2026-126714: PHP partially overwritten session files allow object injection — the partially overwritten session file from the same release
- CVE-2026-115560: PHP session serializer mismatch allows object injection — the session serializer mismatch from the same release
- CVE-2026-129289: PHP-FPM request smuggling through an unread request body — the PHP-FPM request smuggling bug, the most exposed of the seven
- Hardening a Public-Facing Service Beyond the Basics — where PHP-FPM sits behind nginx or Apache, and what the socket between them should and should not be able to do
- The Half of Patching That Happens After the Patch is Installed — an upgraded PHP package is still the old PHP until every FPM worker and every Apache child has been replaced
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.

