PHPAfterShell (CVE-2026-126714) is a flaw in PHP’s default file session handler that can let an attacker run code on a PHP server. PHP rates it 9.2 on CVSS 4.0 and fixed it on November 19, 2026 in 8.2.36, 8.3.37, 8.4.28 and 8.5.13 (PHP advisory). The October PHP2Shell releases do not contain this fix, so servers patched for PHP2Shell are still affected (The Hacker News).
Key highlights
- What it is: a flaw in how PHP saves sessions to files that can let an attacker run code as the PHP worker.
- Severity: CVSS 4.0 9.2, critical (PHP).
- Affected: PHP below 8.2.36, 8.3.37, 8.4.28 or 8.5.13. Every 8.1 and older release too.
- Affected configuration: sessions stored with the
fileshandler, PHP’s default. - Fix: PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13 or 8.6.0.
- Stopgap:
session.upload_progress.enabled = 0closes one path only. - Exploitation: neither the PHP maintainers nor the reporter report attacks (The Hacker News).
Who is exposed
A PHP application is exposed when it runs an affected version and keeps sessions in files, which PHP does by default. Sessions stored in Redis, a database or another store that replaces records in one step are not affected by this flaw, though PHP advises checking how each store handles an interrupted update.
Fix status
| Source | Status | Builds |
|---|---|---|
| PHP 8.5 | Fixed | 8.5.13 |
| PHP 8.4 | Fixed | 8.4.28 |
| PHP 8.3 | Fixed | 8.3.37 |
| PHP 8.2 | Fixed | 8.2.36 |
| PHP 8.6 | Fixed | 8.6.0, released the same day |
| PHP 8.1 and older | No fix planned | end of life |
| Debian 12 and 13 (security) | Fixed | 8.2.36-1~deb12u1, 8.4.28-1~deb13u1 |
| Debian testing and unstable | No fix yet | 8.4.27-1 |
| Ubuntu | Needs evaluation | |
| Alpine | No advisory yet | |
| Red Hat | No advisory yet |
Distribution packages can include the fix without a change in the PHP version number, so check your vendor’s advisory, not only the version.
Upload progress is now off by default
The Hacker News compared the PHP source of the October and November releases and found that the fixed releases switch session.upload_progress.enabled off by default. The release notes do not mention the change. A php.ini file, distribution package or hosting panel that switches the setting on keeps it on. Applications that rely on upload progress and set nothing need to switch it back on after the update.
How to check
- Run
php -von each host. For a container image:docker run --rm --entrypoint php <image> -v. - Check
session.save_handlerin the configuration that serves web requests, for example the PHP-FPM pool configuration orphpinfo()on a test page that you remove afterwards.filesis the affected handler. - Check that the PHP version serving web requests, not only the command line, is the new one.
How Cycode helps
Two items on the Threat Intelligence dashboard query the Context Intelligence Graph:
- Image runtimes: scanned container images with a PHP runtime below the fixed versions, from an official
phpimage or a distribution package. Images patched only for PHP2Shell are listed. The count is the number of images. - Dockerfiles: Dockerfiles that reference a PHP runtime or PHP application image. The item does not read the PHP version, so check the version in the built image.
What to do
- Install the fixed release for your branch:
8.2.36,8.3.37,8.4.28,8.5.13or8.6.0. Move PHP 8.1 and older to a supported branch. If your application uses upload progress, setsession.upload_progress.enabled = 1after the update. - Rebuild container images that bundle PHP with a fresh base image (
docker build --pull) and redeploy them. - If you cannot update yet and your application does not use upload progress, set
session.upload_progress.enabled = 0inphp.inior the PHP-FPM pool (php_admin_flag) and restart the PHP workers. Also limit the untrusted data your application stores in sessions. This is not a full fix: applications that put attacker-controlled data into sessions in other ways stay affected. Servers that kept the setting off since PHP2Shell still need the update.
Sources
- PHP security advisory GHSA-fm2m-fjf5-v3cp
- CVE-2026-126714
- The Hacker News, November 19, 2026
- PHP 8 ChangeLog
- PHP supported versions
- Alpine security tracker
- Debian security tracker
- Ubuntu CVE page