Skip to content
Threat Feed
critical advisory PoC updated

PHP: Remote code execution via session data corruption (CVE-2026-126714)

PHP's default file-based session handler is vulnerable to object injection and remote code execution when a session write is intentionally interrupted, allowing an attacker to manipulate serialized session data.

CVE search metadata

CVE search record: CVE-2026-126714. KEV: no. Product: PHP, PHP (8.5.x < 8.5.13, 8.4.x < 8.4.28, 8.3.x < 8.3.37, 8.2.x < 8.2.36). Brief: PHP: Remote code execution via session data corruption (CVE-2026-126714). Brief link: https://feed.craftedsignal.io/briefs/2026-11-php-aftershell-rce-cve-2026-126714/

Triage facts

Revision 3
Applicability
PHP, PHP (8.5.x < 8.5.13, 8.4.x < 8.4.28, 8.3.x < 8.3.37, 8.2.x < 8.2.36)
Evidence
Unknown
Severity
Critical
Action
Immediate escalation
Sources
7 public sources
Freshness
Revision 3Nov 21, 02:06 UTC
Vulnerabilities
1 CVE
Source quality
B2Likely
Revision history 2 entries · Revision 3
  1. Revision 3

    added coverage for PHP (8.5.x < 8.5.13, 8.4.x < 8.4.28, 8.3.x < 8.3.37, 8.2.x < 8.2.36)

    Changed: action_plan, affected_products, affected_vendors, cve_verification, cves, lastmod, priority_signals, references, updates

    Sources: 1

  2. Revision 2

    poc_available

    Changed: cve_verification, has_poc, lastmod, poc_references, references, updates

    Sources: 1

Overview

PHP versions 8.2., 8.3., 8.4., and 8.5. contain a vulnerability, designated phpAfterShell (CVE-2026-126714), in the default files session save handler. The handler does not clear session files before writing updated data. If a write operation is interrupted, the session file can retain a mix of new and old data. An attacker who can influence session data, such as through the session upload progress feature, can induce this interruption to inject serialized objects. When successfully processed by the application, these objects can lead to remote code execution (RCE) if a suitable gadget chain or secondary vulnerability is present.

Attack Chain

  1. The attacker identifies a target PHP application that has the session.upload_progress feature enabled.
  2. The attacker initiates a multipart form upload containing a malicious payload designed to trigger an object injection.
  3. The attacker forces an interruption of the PHP worker process during the session file write operation (e.g., via memory exhaustion).
  4. The session file is left in a corrupted state containing the attacker-controlled serialized object.
  5. A subsequent legitimate request calls session_start(), loading the corrupted data.
  6. The PHP interpreter deserializes the malicious object, triggering the gadget chain or secondary memory corruption vulnerability to execute arbitrary code.

Impact

Successful exploitation can result in remote code execution on the server. Furthermore, the vulnerability can be used to manipulate or corrupt critical session values, such as CSRF tokens or user authentication status.

Recommendation

  • Immediately upgrade to the fixed PHP versions: 8.2.36, 8.3.37, 8.4.28, or 8.5.13.
  • If an immediate upgrade is not possible, disable the session upload progress feature by setting session.upload_progress.enabled = 0 in php.ini and restarting the PHP worker processes.
  • Rebuild and redeploy all container images using the patched PHP versions.
  • Audit and minimize untrusted data stored within PHP session files to mitigate the impact of object injection.

Immediate actions

Inventory all public-facing PHP applications and identify those running vulnerable versions.

SOC 24h

Patch servers to the fixed PHP versions (8.2.36, 8.3.37, 8.4.28, or 8.5.13).

IT Operations 48h

Inventory all PHP runtime installations across the enterprise.

IT Operations 48h

Upgrade to PHP 8.5.13, 8.4.28, 8.3.37, or 8.2.36 where applicable.

IT Operations 72h

Threat Hunt

Monitor web server error logs for recurrent worker process crashes or out-of-memory errors occurring during file upload requests.

T1190 medium medium confidence hunt now

Data: Web server error logs, PHP-FPM logs

Identify systems running vulnerable PHP versions via software inventory or asset management tools.

high high confidence hunt now

Data: Asset inventory logs, Configuration management database (CMDB), Application manifests

Mitigations

Set session.upload_progress.enabled = 0 in php.ini for legacy environments.

immediate IT Operations

CVE-2026-126714