cve.bz

CVE-2026-126714 (phpAfterShell) Partially overwritten session files can lead to remote code execution

9.2 criticalEPSS 13%

Known as phpAfterShell

Critical (9.2) in php group php. EPSS 13% estimated probability of exploitation activity in the next 30 days.

On this page
Partially overwritten session files can lead to remote code execution. The files session save handler, which is the default, writes updated session data into the existing session file without first clearing it. If a write is interrupted, the file can contain the beginning of the new session followed by the end of the old one, and bytes of an ordinary string can later be unserialized as objects. An attacker who can influence the session data, for example through session upload progress, and interrupt a write at a suitable point may inject objects, which can lead to code execution when the application contains a suitable gadget chain. Session data can also be corrupted. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.

Severity

CVSS 4.0

9.2 critical
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
EPSS
13% estimated probability of exploitation activity in the next 30 days; 96th percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: total, assessed 2026-11-20. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition
CWE-662 Improper Synchronization
Published
Modified
Assigned by
php (CNA)
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-126714 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-126714?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-126714?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-126714 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
PHP Group PHPbefore 8.2.36
PHP Group PHPfrom 8.3.0 before 8.3.37
PHP Group PHPfrom 8.4.0 before 8.4.28
PHP Group PHPfrom 8.5.0 before 8.5.13

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12php8.28.2.36-1~deb12u1DEBIAN-CVE-2026-126714 DLA-4916-1
Debian13php8.48.4.28-1~deb13u1DEBIAN-CVE-2026-126714 DSA-6641-1
Debian14php8.4no fix listedDEBIAN-CVE-2026-126714
Ubuntu22.04:LTSphp8.1no fix listedUBUNTU-CVE-2026-126714
Ubuntu24.04:LTSphp8.3no fix listedUBUNTU-CVE-2026-126714
Ubuntu26.04:LTS, 26.10php8.5no fix listedUBUNTU-CVE-2026-126714
UbuntuPro:14.04:LTSphp5no fix listedUBUNTU-CVE-2026-126714
UbuntuPro:16.04:LTSphp7.07.0.33-0ubuntu0.16.04.16+esm23UBUNTU-CVE-2026-126714
UbuntuPro:18.04:LTSphp7.27.2.24-0ubuntu0.18.04.17+esm15UBUNTU-CVE-2026-126714
UbuntuPro:20.04:LTSphp7.4no fix listedUBUNTU-CVE-2026-126714
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise High Performance Computing 15 SP5-ESPOS and 5 morephp8, php8-fpm, php8-test and 3 more8.0.30-150400.4.83.1SUSE-SU-2026:5389-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise Server 15 SP4-LTSS and 5 morephp7, php7-fpm, php7-fastcgi and 1 more7.4.33-150400.4.84.1SUSE-SU-2026:5399-1
SUSELinux Enterprise Module for Legacy 15 SP7php7, apache2-mod_php77.4.33-150400.4.84.1SUSE-SU-2026:5399-1
SUSELinux Enterprise Module for Package Hub 15 SP7php7, php7-fpm, php7-test and 3 more7.4.33-150400.4.84.1SUSE-SU-2026:5399-1
SUSELinux Enterprise Module for Web and Scripting 15 SP7php8, php8-fpm, php8-test and 3 more8.3.37-150700.3.27.1SUSE-SU-2026:5398-1
SUSELinux Enterprise Server 15 SP6-LTSS, Linux Enterprise Server for SAP Applications 15 SP6php8, php8-fpm, php8-test and 3 more8.2.36-150600.3.46.1SUSE-SU-2026:5390-1
openSUSETumbleweedphp88.5.13-1.1openSUSE-SU-2026:12618-1
AlmaLinux8apcu-panel, php-pecl-apcu, php-pecl-apcu-devel5.1.18-1.module_el8.6.0+2750+78feabcbALSA-2026:100991
AlmaLinux8libzip, libzip-devel, libzip-tools1.6.1-1.module_el8.10.0+3935+28808425ALSA-2026:100991
AlmaLinux8libzip, libzip-tools1.6.1-1.module_el8.6.0+2750+78feabcbALSA-2026:100991
AlmaLinux8libzip, libzip-tools1.6.1-1.module_el8.6.0+3239+bedf0508ALSA-2026:100991
AlmaLinux8php, php-gd, php-cli and 24 more7.4.33-9.module_el8.10.0+4385+9e3d9df0ALSA-2026:100991
AlmaLinux8php-pear1:1.10.13-1.module_el8.10.0+3935+28808425ALSA-2026:100991
AlmaLinux8php-pecl-apcu, php-pecl-apcu-devel5.1.18-1.module_el8.10.0+3935+28808425ALSA-2026:100991
AlmaLinux8php-pecl-apcu, php-pecl-apcu-devel5.1.18-1.module_el8.6.0+3239+bedf0508ALSA-2026:100991
AlmaLinux8php-pecl-rrd2.0.1-1.module_el8.10.0+3935+28808425ALSA-2026:100991
AlmaLinux8php-pecl-rrd2.0.1-1.module_el8.6.0+2750+78feabcbALSA-2026:100991
AlmaLinux8php-pecl-rrd2.0.1-1.module_el8.6.0+3239+bedf0508ALSA-2026:100991
AlmaLinux8php-pecl-xdebug2.9.5-1.module_el8.10.0+3935+28808425ALSA-2026:100991
6 more for AlmaLinux in the JSON.
Alpinev3.24php838.3.37-r0ALPINE-CVE-2026-126714
Alpinev3.24php848.4.28-r0ALPINE-CVE-2026-126714
Alpinev3.24php858.5.13-r0ALPINE-CVE-2026-126714
Azure Linux3phpno fix listedAZL-115117
Alpaquitastreamphp838.3.37-r0BELL-CVE-2026-126714

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpine · Alpaquita.

Red Hat

Red Hat rates this Critical.

Red Hat's mitigation

See the security bulletin for a detailed mitigation procedure.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10php8.4-0:8.4.28-1.el10_3Fixed 2026-11-20RHSA-2026:100821
Red Hat Enterprise Linux 10phpAffected
Red Hat Enterprise Linux 6phpOut of support scope
Red Hat Enterprise Linux 7phpAffected
Red Hat Enterprise Linux 8php:7.4/phpAffected
Red Hat Enterprise Linux 8php:8.2/phpAffected
Red Hat Enterprise Linux 9phpAffected
Red Hat Enterprise Linux 9php:8.2/phpAffected
Red Hat Enterprise Linux 9php:8.3/phpAffected
Red Hat Enterprise Linux 9php:8.4/phpAffected
Red Hat Hardened ImagesphpAffected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-126714.

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it. How Harbor Check reads them, and what it found.

  • bimajunestifa/phpAfterShell Harbor Check: matches CVE 1 star, created
    CVE-2026-126714 (phpAfterShell)
  • VABISMO/PHPAfterShell-poc Harbor Check: matches CVE 0 stars, created
    Educational proof of concept for CVE-2026-126714 (phpAfterShell): unauthenticated RCE via interrupted session writes in PHP's file-based se…
  • evenomn/cve-2026-126714-phpAfterShell Harbor Check: matches CVE 0 stars, Python, created
  • tani2shell/phpaftershell-lab Harbor Check: matches CVE 0 stars, created
    PHP session write-race deserialization lab — gadget splice via non-atomic upload_progress writes, PHP 8.4.27 vs patched 8.4.28 pair (CVE-20…
  • ashrafzaryouh/CVE-2026-126714 0 stars, Python, created
    CVE-2026-126714

Attack patterns (CAPEC)

  • CAPEC-27 Leveraging Race Conditions via Symbolic Links Likelihood: Medium · Severity: High
  • CAPEC-29 Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions Likelihood: High · Severity: High
  • CAPEC-25 Forced Deadlock Likelihood: Low · Severity: High
  • CAPEC-26 Leveraging Race Conditions Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON