Repository navigation
v3.2.6
Status on 2 November: PHP has not shipped a fix for any of the three issues below yet. The latest PHP releases are still 8.5.12, 8.4.27, 8.3.36 and 8.2.35 from 21 October. PHP has fixed the
unserialize()use-after-free and the SimpleXML double free in its source code; they will arrive with the next releases. CVE-2026-115560 (session upload progress) is still covered only by the recommended settingsession.upload_progress.enabled=0, which this module enforces by default. Keep the module installed, also after you upgrade PHP.
A PHP extension that mitigates php2shell (CVE-2026-109618 / CVE-2026-109619) on PHP 5.4 to 8.5, for Linux (x86_64, arm64) and Windows (x64, x86), without rebuilding PHP. On PHP builds without the official fix it mirrors that fix component by component; on builds that have it, those layers step aside. Install the official PHP release where you can. This module protects the hosts that cannot be upgraded yet, and adds protections PHP itself does not ship yet.
What it protects against
- php2shell (CVE-2026-109618 / -109619): hardened multipart parser with a memory-headroom guard, immediate worker exit on an out-of-memory during request startup, request-state reset at request end, and the session upload-progress handler detached.
- CVE-2026-115560, session upload progress (advisory):
session.upload_progress.enabledforced to0and locked, on every PHP version, patched or not. No PHP release fixes it yet. unserialize()use-after-free (php-src#24481, fixed in PHP's source on 30 October, not in a release yet), and the further routes to the same bug PHP has found since (php-src#24674: destructors run by the garbage collector, error handlers,__toString(),session_decode(), fibers; the fix is still under review and aimed at the next major PHP version): nestedunserialize()/session_decode()calls get their own state. Since 3.2.0, per fiber since 3.2.6.- SimpleXML double free in the garbage collector, introduced by 8.4.27 and 8.5.12 (php-src#24488, fixed in PHP's source on 22 October, not released yet): PHP's fix applied from inside the module, on those two releases only. Since 3.2.1.
What's new in 3.2.6
The unserialize() protection now keeps its state per fiber. Upgrade if your applications use fibers (PHP 8.1 and later); nothing else changes.
- PHP keeps one
unserialize()state per thread, not one per fiber. When application code suspended a fiber in the middle of anunserialize()(for example fromSerializable::unserialize()) while another fiber also unserialized, the module could restore a state that the other fiber had already freed: a use-after-free that stock PHP does not have in that case. We found it ourselves by running PHP's new tests for php-src#24674 against the module. The state is now saved and restored per fiber, which is also what PHP's pending fix (php-src#24751) does. As a side effect, one fiber no longer sees another fiber's back-references, which stock PHP still allows. - PHP 5.4 to 8.0 have no fibers and are unchanged.
Tested before release: Valgrind clean with the module on 8.1, 8.4 (NTS and ZTS) and 8.5 for the fiber case. The six tests from php-src#24751 report no memory errors, and the five memory-safety ones (garbage-collector destructor, error handler, __toString(), session_decode(), fibers) give PHP's expected output. PHP's own serialize, session, SPL and fiber test suites give the same results as with 3.2.5. Builds 5.4 to 8.5 for x86_64 and arm64 pass the glibc check, and all 42 Windows DLLs loaded into the official windows.php.net builds in CI.
Changes since 3.1.0
- 3.2.6:
unserialize()state per fiber (above). - 3.2.5: parser fixes from @NewEraCracker (#25): per-thread stop flag on thread-safe PHP, stopped reads never processed, legacy parser hardening. Bundle refresh:
install_guard.shworks on hosts with anoexec/tmp(#28). - 3.2.4: phpinfo status fixes (#18, #19); upload-progress detach on patched PHP documented (#17).
- 3.2.3: on thread-safe PHP with a threaded SAPI (Apache
mod_phpwith mpm_winnt, worker or event, which includes every WindowstsDLL), the multipart handler is now installed in every thread. - 3.2.2: PHP 5.4 to 5.6 thread-safe builds compile (Linux ZTS, Windows TS).
- 3.2.1: SimpleXML double-free workaround for 8.4.27 and 8.5.12.
- 3.2.0:
unserialize()re-entrancy isolation. - New downloads: Windows DLLs for PHP 5.4 (VC9, x86) and 5.6 (VC11) and 32-bit DLLs for 7.2 to 8.5;
install_guard.shfor Debian / Ubuntu.
Download
hp_uploadprogress_guard-3.2.6.zip (or .tar.gz, same content) holds everything: an INSTALL.txt with the steps per platform, the installer for Debian / Ubuntu, the ini files, the source, and a SHA256SUMS for all of it.
| Folder | Contents | PHP |
|---|---|---|
linux/ |
hp_uploadprogress_guard-<X.Y>.so (x86_64, glibc 2.3+) and -aarch64.so (arm64, glibc 2.17+) |
5.4 to 8.5 |
windows/ |
php_hp_uploadprogress_guard-<X.Y>-<nts|ts>-<compiler>-<x64|x86>.dll |
5.4 (vc9, x86), 5.6 (vc11), 7.2 to 7.4 (vc15), 8.0 to 8.3 (vs16), 8.4 and 8.5 (vs17) |
ini/ |
ini for Debian / Ubuntu mods-available, and for cPanel / DirectAdmin php.d |
|
src/ |
source, for anything not prebuilt |
The Linux .so files are NTS builds, which is what php-fpm, CGI and almost every distribution and panel ship; thread-safe Linux builds compile from src/ in one step. The Windows DLL must match your PHP's version, thread safety, compiler and architecture: php -i shows all four.
Install
- Debian / Ubuntu (Sury / Ondrej packages):
tar xzf hp_uploadprogress_guard-3.2.6.tar.gz && sudo bash hp_uploadprogress_guard-3.2.6/install_guard.sh --reloadinstalls the module for every PHP version on the host, from the bundle, with no download. It reloads PHP-FPM and Apache only with--reload, and then checks that the running services really loaded it.--removeundoes everything. - cPanel EA4, DirectAdmin, other Linux, Windows: see Install in the README.
- Check through the web server: a
phpinfo()page shows thehp_uploadprogress_guardblock withversion => 3.2.6.php --rishows the command-line configuration, which is often not what the site runs with.
Upgrading from an earlier version: replace the file and reload PHP-FPM / Apache. No ini change is needed; the newer switches unserialize_isolation and simplexml_gc_fix default to on.