Back Securityweek phpAfterShell Vulnerability Revives PHP2Shell's Attack Path
PHP last week patched a critical-severity vulnerability residing in the same dangerous state as the PHP2Shell flaws, cybersecurity firm Depthfirst says. Dubbed phpAfterShell , the security flaw is tracked as CVE-2026-126714 (CVSS score of 9.2), and was resolved on November 19 alongside six other critical issues . According to Depthfirst, the bug could allow an attacker who can control data written to a session file and interrupt the session write operation to trigger an object deserialization and achieve remote code execution (RCE). It exists because PHP overwrites the session file from the start without emptying it first. If the operation is interrupted mid-write, or before the subsequent truncation operation removes old trailing data, the file is left with mixed content: fresh session data followed by remnants of the old session. “We discovered reliable methods to interrupt the file operation during session upload-progress updates, allowing us to splice the prefix of one valid session with the suffix of another. A subsequent session operation treats the corrupted data as legitimate server-side state, giving attackers control over session values and the ability to trigger object deserialization,” Depthfirst notes in its technical write-up. An attacker could arrange the new and old data so that the combined file would be interpreted differently from the original sessions, and parts of ordinary strings would become serialized object data. A future session would create the objects and invoke their deserialization. “Session upload progress provides one way for a remote client to influence stored session data through multipart uploads. The same underlying problem can arise when an application stores large user-controlled strings in a session. In threaded PHP builds, a hard memory-limit failure in another thread can terminate the process while the session write is in progress,” PHP notes in its advisory . phpAfterShell, Depthfirst explains, is related to PHP2Shell , which occurred because, during the parsing of an unauthenticated multipart request, PHP’s upload-progress callback could open and decode a file-backed session before the target script would begin. Because objects would become active during the callback, PHP added restrictions to which objects could be created in memory, but did not modify the underlying file update behavior. “Even with the new restrictions in place, the callback still reads the existing Session, adds upload-progress state, serializes the whole thing, and writes it back to the same file,” Depthfirst explains. Successful exploitation of phpAfterShell requires certain conditions to be met: default session storage to be active, an exploitation route (the easiest is upload progress tracking), the PHP process to stop mid-write, a request to call session_start() on the corrupted file, and a deserialization-to-code-execution path. Patches for the vulnerability were included in PHP versions 8.6.0, 8.5.13, 8.4.28, 8.3.37, and 8.2.36. There appear to be no reports of phpAfterShell’s in-the-wild exploitation. Related: SAP NetWeaver, Cisco Expressway Flaws Exploited in Attacks Related: WhatsApp Fixes Flaw Uncovered While Disrupting Scam Campaign Related: Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE Related: F5 Patches Critical NGINX2Root Flaws as PoC Exploits Go Public
Dubbed phpAfterShell , the security flaw is tracked as CVE-2026-126714 (CVSS score of 9.2), and was resolved on November 19 alongside six other critical issues . According to Depthfirst, the bug could allow an attacker who can control data written to a session file and interrupt the session write operation to trigger an object deserialization and achieve remote code execution (RCE). It exists because PHP overwrites the session file from the start without emptying it first. If the operation is interrupted mid-write, or before the subsequent truncation operation removes old trailing data, the file is left with mixed content: fresh session data followed by remnants of the old session. “We discovered reliable methods to interrupt the file operation during session upload-progress updates, allowing us to splice the prefix of one valid session with the suffix of another. A subsequent session operation treats the corrupted data as legitimate server-side state, giving attackers control over session values and the ability to trigger object deserialization,” Depthfirst notes in its technical write-up. An attacker could arrange the new and old data so that the combined file would be interpreted differently from the original sessions, and parts of ordinary strings would become serialized object data. A future session would create the objects and invoke their deserialization. “Session upload progress provides one way for a remote client to influence stored session data through multipart uploads. The same underlying problem can arise when an application stores large user-controlled strings in a session. In threaded PHP builds, a hard memory-limit failure in another thread can terminate the process while the session write is in progress,” PHP notes in its advisory . phpAfterShell, Depthfirst explains, is related to PHP2Shell , which occurred because, during the parsing of an unauthenticated multipart request, PHP’s upload-progress callback could open and decode a file-backed session before the target script would begin. Because objects would become active during the callback, PHP added restrictions to which objects could be created in memory, but did not modify the underlying file update behavior. “Even with the new restrictions in place, the callback still reads the existing Session, adds upload-progress state, serializes the whole thing, and writes it back to the same file,” Depthfirst explains. Successful exploitation of phpAfterShell requires certain conditions to be met: default session storage to be active, an exploitation route (the easiest is upload progress tracking), the PHP process to stop mid-write, a request to call session_start() on the corrupted file, and a deserialization-to-code-execution path. Patches for the vulnerability were included in PHP versions 8.6.0, 8.5.13, 8.4.28, 8.3.37, and 8.2.36. There appear to be no reports of phpAfterShell’s in-the-wild exploitation. Related: SAP NetWeaver, Cisco Expressway Flaws Exploited in Attacks Related: WhatsApp Fixes Flaw Uncovered While Disrupting Scam Campaign Related: Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE Related: F5 Patches Critical NGINX2Root Flaws as PoC Exploits Go Public
According to Depthfirst, the bug could allow an attacker who can control data written to a session file and interrupt the session write operation to trigger an object deserialization and achieve remote code execution (RCE). It exists because PHP overwrites the session file from the start without emptying it first. If the operation is interrupted mid-write, or before the subsequent truncation operation removes old trailing data, the file is left with mixed content: fresh session data followed by remnants of the old session. “We discovered reliable methods to interrupt the file operation during session upload-progress updates, allowing us to splice the prefix of one valid session with the suffix of another. A subsequent session operation treats the corrupted data as legitimate server-side state, giving attackers control over session values and the ability to trigger object deserialization,” Depthfirst notes in its technical write-up. An attacker could arrange the new and old data so that the combined file would be interpreted differently from the original sessions, and parts of ordinary strings would become serialized object data. A future session would create the objects and invoke their deserialization. “Session upload progress provides one way for a remote client to influence stored session data through multipart uploads. The same underlying problem can arise when an application stores large user-controlled strings in a session. In threaded PHP builds, a hard memory-limit failure in another thread can terminate the process while the session write is in progress,” PHP notes in its advisory . phpAfterShell, Depthfirst explains, is related to PHP2Shell , which occurred because, during the parsing of an unauthenticated multipart request, PHP’s upload-progress callback could open and decode a file-backed session before the target script would begin. Because objects would become active during the callback, PHP added restrictions to which objects could be created in memory, but did not modify the underlying file update behavior. “Even with the new restrictions in place, the callback still reads the existing Session, adds upload-progress state, serializes the whole thing, and writes it back to the same file,” Depthfirst explains. Successful exploitation of phpAfterShell requires certain conditions to be met: default session storage to be active, an exploitation route (the easiest is upload progress tracking), the PHP process to stop mid-write, a request to call session_start() on the corrupted file, and a deserialization-to-code-execution path. Patches for the vulnerability were included in PHP versions 8.6.0, 8.5.13, 8.4.28, 8.3.37, and 8.2.36. There appear to be no reports of phpAfterShell’s in-the-wild exploitation. Related: SAP NetWeaver, Cisco Expressway Flaws Exploited in Attacks Related: WhatsApp Fixes Flaw Uncovered While Disrupting Scam Campaign Related: Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE Related: F5 Patches Critical NGINX2Root Flaws as PoC Exploits Go Public
It exists because PHP overwrites the session file from the start without emptying it first. If the operation is interrupted mid-write, or before the subsequent truncation operation removes old trailing data, the file is left with mixed content: fresh session data followed by remnants of the old session. “We discovered reliable methods to interrupt the file operation during session upload-progress updates, allowing us to splice the prefix of one valid session with the suffix of another. A subsequent session operation treats the corrupted data as legitimate server-side state, giving attackers control over session values and the ability to trigger object deserialization,” Depthfirst notes in its technical write-up. An attacker could arrange the new and old data so that the combined file would be interpreted differently from the original sessions, and parts of ordinary strings would become serialized object data. A future session would create the objects and invoke their deserialization. “Session upload progress provides one way for a remote client to influence stored session data through multipart uploads. The same underlying problem can arise when an application stores large user-controlled strings in a session. In threaded PHP builds, a hard memory-limit failure in another thread can terminate the process while the session write is in progress,” PHP notes in its advisory . phpAfterShell, Depthfirst explains, is related to PHP2Shell , which occurred because, during the parsing of an unauthenticated multipart request, PHP’s upload-progress callback could open and decode a file-backed session before the target script would begin. Because objects would become active during the callback, PHP added restrictions to which objects could be created in memory, but did not modify the underlying file update behavior. “Even with the new restrictions in place, the callback still reads the existing Session, adds upload-progress state, serializes the whole thing, and writes it back to the same file,” Depthfirst explains. Successful exploitation of phpAfterShell requires certain conditions to be met: default session storage to be active, an exploitation route (the easiest is upload progress tracking), the PHP process to stop mid-write, a request to call session_start() on the corrupted file, and a deserialization-to-code-execution path. Patches for the vulnerability were included in PHP versions 8.6.0, 8.5.13, 8.4.28, 8.3.37, and 8.2.36. There appear to be no reports of phpAfterShell’s in-the-wild exploitation. Related: SAP NetWeaver, Cisco Expressway Flaws Exploited in Attacks Related: WhatsApp Fixes Flaw Uncovered While Disrupting Scam Campaign Related: Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE Related: F5 Patches Critical NGINX2Root Flaws as PoC Exploits Go Public
“We discovered reliable methods to interrupt the file operation during session upload-progress updates, allowing us to splice the prefix of one valid session with the suffix of another. A subsequent session operation treats the corrupted data as legitimate server-side state, giving attackers control over session values and the ability to trigger object deserialization,” Depthfirst notes in its technical write-up. An attacker could arrange the new and old data so that the combined file would be interpreted differently from the original sessions, and parts of ordinary strings would become serialized object data. A future session would create the objects and invoke their deserialization. “Session upload progress provides one way for a remote client to influence stored session data through multipart uploads. The same underlying problem can arise when an application stores large user-controlled strings in a session. In threaded PHP builds, a hard memory-limit failure in another thread can terminate the process while the session write is in progress,” PHP notes in its advisory . phpAfterShell, Depthfirst explains, is related to PHP2Shell , which occurred because, during the parsing of an unauthenticated multipart request, PHP’s upload-progress callback could open and decode a file-backed session before the target script would begin. Because objects would become active during the callback, PHP added restrictions to which objects could be created in memory, but did not modify the underlying file update behavior. “Even with the new restrictions in place, the callback still reads the existing Session, adds upload-progress state, serializes the whole thing, and writes it back to the same file,” Depthfirst explains. Successful exploitation of phpAfterShell requires certain conditions to be met: default session storage to be active, an exploitation route (the easiest is upload progress tracking), the PHP process to stop mid-write, a request to call session_start() on the corrupted file, and a deserialization-to-code-execution path. Patches for the vulnerability were included in PHP versions 8.6.0, 8.5.13, 8.4.28, 8.3.37, and 8.2.36. There appear to be no reports of phpAfterShell’s in-the-wild exploitation. Related: SAP NetWeaver, Cisco Expressway Flaws Exploited in Attacks Related: WhatsApp Fixes Flaw Uncovered While Disrupting Scam Campaign Related: Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE Related: F5 Patches Critical NGINX2Root Flaws as PoC Exploits Go Public
An attacker could arrange the new and old data so that the combined file would be interpreted differently from the original sessions, and parts of ordinary strings would become serialized object data. A future session would create the objects and invoke their deserialization. “Session upload progress provides one way for a remote client to influence stored session data through multipart uploads. The same underlying problem can arise when an application stores large user-controlled strings in a session. In threaded PHP builds, a hard memory-limit failure in another thread can terminate the process while the session write is in progress,” PHP notes in its advisory . phpAfterShell, Depthfirst explains, is related to PHP2Shell , which occurred because, during the parsing of an unauthenticated multipart request, PHP’s upload-progress callback could open and decode a file-backed session before the target script would begin. Because objects would become active during the callback, PHP added restrictions to which objects could be created in memory, but did not modify the underlying file update behavior. “Even with the new restrictions in place, the callback still reads the existing Session, adds upload-progress state, serializes the whole thing, and writes it back to the same file,” Depthfirst explains. Successful exploitation of phpAfterShell requires certain conditions to be met: default session storage to be active, an exploitation route (the easiest is upload progress tracking), the PHP process to stop mid-write, a request to call session_start() on the corrupted file, and a deserialization-to-code-execution path. Patches for the vulnerability were included in PHP versions 8.6.0, 8.5.13, 8.4.28, 8.3.37, and 8.2.36. There appear to be no reports of phpAfterShell’s in-the-wild exploitation. Related: SAP NetWeaver, Cisco Expressway Flaws Exploited in Attacks Related: WhatsApp Fixes Flaw Uncovered While Disrupting Scam Campaign Related: Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE Related: F5 Patches Critical NGINX2Root Flaws as PoC Exploits Go Public
“Session upload progress provides one way for a remote client to influence stored session data through multipart uploads. The same underlying problem can arise when an application stores large user-controlled strings in a session. In threaded PHP builds, a hard memory-limit failure in another thread can terminate the process while the session write is in progress,” PHP notes in its advisory . phpAfterShell, Depthfirst explains, is related to PHP2Shell , which occurred because, during the parsing of an unauthenticated multipart request, PHP’s upload-progress callback could open and decode a file-backed session before the target script would begin. Because objects would become active during the callback, PHP added restrictions to which objects could be created in memory, but did not modify the underlying file update behavior. “Even with the new restrictions in place, the callback still reads the existing Session, adds upload-progress state, serializes the whole thing, and writes it back to the same file,” Depthfirst explains. Successful exploitation of phpAfterShell requires certain conditions to be met: default session storage to be active, an exploitation route (the easiest is upload progress tracking), the PHP process to stop mid-write, a request to call session_start() on the corrupted file, and a deserialization-to-code-execution path. Patches for the vulnerability were included in PHP versions 8.6.0, 8.5.13, 8.4.28, 8.3.37, and 8.2.36. There appear to be no reports of phpAfterShell’s in-the-wild exploitation. Related: SAP NetWeaver, Cisco Expressway Flaws Exploited in Attacks Related: WhatsApp Fixes Flaw Uncovered While Disrupting Scam Campaign Related: Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE Related: F5 Patches Critical NGINX2Root Flaws as PoC Exploits Go Public
phpAfterShell, Depthfirst explains, is related to PHP2Shell , which occurred because, during the parsing of an unauthenticated multipart request, PHP’s upload-progress callback could open and decode a file-backed session before the target script would begin. Because objects would become active during the callback, PHP added restrictions to which objects could be created in memory, but did not modify the underlying file update behavior. “Even with the new restrictions in place, the callback still reads the existing Session, adds upload-progress state, serializes the whole thing, and writes it back to the same file,” Depthfirst explains. Successful exploitation of phpAfterShell requires certain conditions to be met: default session storage to be active, an exploitation route (the easiest is upload progress tracking), the PHP process to stop mid-write, a request to call session_start() on the corrupted file, and a deserialization-to-code-execution path. Patches for the vulnerability were included in PHP versions 8.6.0, 8.5.13, 8.4.28, 8.3.37, and 8.2.36. There appear to be no reports of phpAfterShell’s in-the-wild exploitation. Related: SAP NetWeaver, Cisco Expressway Flaws Exploited in Attacks Related: WhatsApp Fixes Flaw Uncovered While Disrupting Scam Campaign Related: Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE Related: F5 Patches Critical NGINX2Root Flaws as PoC Exploits Go Public
Because objects would become active during the callback, PHP added restrictions to which objects could be created in memory, but did not modify the underlying file update behavior. “Even with the new restrictions in place, the callback still reads the existing Session, adds upload-progress state, serializes the whole thing, and writes it back to the same file,” Depthfirst explains. Successful exploitation of phpAfterShell requires certain conditions to be met: default session storage to be active, an exploitation route (the easiest is upload progress tracking), the PHP process to stop mid-write, a request to call session_start() on the corrupted file, and a deserialization-to-code-execution path. Patches for the vulnerability were included in PHP versions 8.6.0, 8.5.13, 8.4.28, 8.3.37, and 8.2.36. There appear to be no reports of phpAfterShell’s in-the-wild exploitation. Related: SAP NetWeaver, Cisco Expressway Flaws Exploited in Attacks Related: WhatsApp Fixes Flaw Uncovered While Disrupting Scam Campaign Related: Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE Related: F5 Patches Critical NGINX2Root Flaws as PoC Exploits Go Public
“Even with the new restrictions in place, the callback still reads the existing Session, adds upload-progress state, serializes the whole thing, and writes it back to the same file,” Depthfirst explains. Successful exploitation of phpAfterShell requires certain conditions to be met: default session storage to be active, an exploitation route (the easiest is upload progress tracking), the PHP process to stop mid-write, a request to call session_start() on the corrupted file, and a deserialization-to-code-execution path. Patches for the vulnerability were included in PHP versions 8.6.0, 8.5.13, 8.4.28, 8.3.37, and 8.2.36. There appear to be no reports of phpAfterShell’s in-the-wild exploitation. Related: SAP NetWeaver, Cisco Expressway Flaws Exploited in Attacks Related: WhatsApp Fixes Flaw Uncovered While Disrupting Scam Campaign Related: Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE Related: F5 Patches Critical NGINX2Root Flaws as PoC Exploits Go Public
Successful exploitation of phpAfterShell requires certain conditions to be met: default session storage to be active, an exploitation route (the easiest is upload progress tracking), the PHP process to stop mid-write, a request to call session_start() on the corrupted file, and a deserialization-to-code-execution path. Patches for the vulnerability were included in PHP versions 8.6.0, 8.5.13, 8.4.28, 8.3.37, and 8.2.36. There appear to be no reports of phpAfterShell’s in-the-wild exploitation. Related: SAP NetWeaver, Cisco Expressway Flaws Exploited in Attacks Related: WhatsApp Fixes Flaw Uncovered While Disrupting Scam Campaign Related: Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE Related: F5 Patches Critical NGINX2Root Flaws as PoC Exploits Go Public
Patches for the vulnerability were included in PHP versions 8.6.0, 8.5.13, 8.4.28, 8.3.37, and 8.2.36. There appear to be no reports of phpAfterShell’s in-the-wild exploitation. Related: SAP NetWeaver, Cisco Expressway Flaws Exploited in Attacks Related: WhatsApp Fixes Flaw Uncovered While Disrupting Scam Campaign Related: Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE Related: F5 Patches Critical NGINX2Root Flaws as PoC Exploits Go Public
Related: SAP NetWeaver, Cisco Expressway Flaws Exploited in Attacks Related: WhatsApp Fixes Flaw Uncovered While Disrupting Scam Campaign Related: Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE Related: F5 Patches Critical NGINX2Root Flaws as PoC Exploits Go Public
Related: WhatsApp Fixes Flaw Uncovered While Disrupting Scam Campaign Related: Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE Related: F5 Patches Critical NGINX2Root Flaws as PoC Exploits Go Public
Related: Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE Related: F5 Patches Critical NGINX2Root Flaws as PoC Exploits Go Public
Related: F5 Patches Critical NGINX2Root Flaws as PoC Exploits Go Public
Ionut Arghire is an international correspondent for SecurityWeek.
More from Ionut Arghire
SBC Medical Group Data Breach Impacts Over 2 Million
European Commission Confirms AI-Assisted Cyberattack Disrupted Services
Ruby Patches Ruby2Shell Vulnerability That Could Lead to RCE
N-able Blames Service Disruption on Cyberattack
PHP Patches Seven Critical RCE Vulnerabilities
StepSecurity Secures $20 Million to Expand Supply Chain Protection
Splunk Patches Nearly 140 Flaws Across Three Core Products
F5 Patches Critical NGINX2Root Flaws as PoC Exploits Go Public
GL.iNet Routers, KVMs Compromised via Remote Management Service Flaw
AI Inference Providers Failed to Detect Hacking and Prompt Theft, Says Dragos
BadBox 3.0 Ad Fraud Operation Generating 40 Billion Daily Bid Requests Disrupted
SAP NetWeaver, Cisco Expressway Flaws Exploited in Attacks
CrowdStrike to Acquire Zscaler in $43.9 Billion Deal
FBI Investigating Apparent Hack of Its Key National Criminal Justice Database, AP Source Says
President Trump Taps Kirsten Davies as National Cyber Director
Amazon: China-Linked Hackers’ AI Agents Exploited Medical Software Zero-Day
Flipboard Whatsapp Whatsapp Email
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
