PHP Patches Critical phpAfterShell Session Flaw With Potential RCE

· Original article ↗

Summary

CVE-2026-126714 can turn interrupted file-backed PHP session writes into attacker-controlled deserialization and potentially RCE under specific conditions. PHP released fixes on Nov. 19; PHP and Depthfirst have not reported active exploitation.

Key points

  • The flaw affects vulnerable PHP releases using the default file-based session handler; applications using other session stores are outside this specific defect.
  • An interrupted session-file update can combine new data with leftover bytes, which PHP may later deserialize when loading the session.
  • Session upload progress can expose a pre-authentication path to session manipulation, but exploitation requires specific conditions, including a useful interruption point.
  • Depthfirst demonstrated chaining the primitive with a separate PHP-native memory-corruption technique for code execution; details of that chain remain withheld.
  • The public proof of concept demonstrates session manipulation with a harmless stdClass object; arbitrary deserialization does not automatically mean RCE.
  • Fixed versions are PHP 8.2.36, 8.3.37, 8.4.28 and 8.5.13; PHP 8.6.0 includes the fix. Older PHP 8.1 and earlier releases are end-of-life.
  • Patching is the primary remediation. Disabling session upload progress may remove the easiest exploitation path, but is not a complete fix.

Article Details

Vulnerability Types
  • Interrupted, non-atomic updates to file-backed PHP session files can leave new data combined with stale bytes.
  • Attacker-influenced session deserialization can potentially lead to remote code execution.
Severity
Critical (CVSS v4.0: 9.2)
Affected Versions
  • PHP 8.2 before 8.2.36
  • PHP 8.3 before 8.3.37
  • PHP 8.4 before 8.4.28
  • PHP 8.5 before 8.5.13
  • PHP 8.6.0 pre-release builds during development
Exploitation Status
not_reported
Exploit Availability
public_poc
Patch Status
available
Workarounds
  • If session upload progress is not required, set session.upload_progress.enabled = 0 and restart PHP workers; this removes the easiest exploitation path but is not a complete fix.
  • Moving sessions away from the file-based handler can reduce exposure, but the article recommends installing a patched PHP release.

MITRE ATT&CK

CVE

Products

Related Articles