Skip to content

Vulnerabilities & Patches

Depthfirst finds phpAfterShell flaw in PHP session handling

PHP says the fix appears in PHP 8.6.0, 8.5.13, 8.4.28, 8.3.37, and 8.2.36.

https://breach-signal.com/vulnerabilities/phpaftershell-php-session-rce-cve-2026-126714/

Share

Key facts

  • The fix ships in PHP 8.6.0, 8.5.13, 8.4.28, 8.3.37, and 8.2.36.
  • Depthfirst says an attacker able to control session-file data and interrupt the session write can trigger object deserialization to achieve remote code execution.
  • Depthfirst reports reliable methods to break the file write during session upload-progress updates so the start of one valid session joins the end of another.
  • When the server next uses the session, it reads the damaged file as valid state, letting attackers control session values and start object deserialization.

Depthfirst uncovered the phpAfterShell vulnerability, assigned CVE-2026-126714 and rated 9.2 on the CVSS scale, and PHP issued a patch for it on Nov. 19, 2026 together with six additional critical flaws. Depthfirst says its researchers located phpAfterShell using AI frontier models designed for cybersecurity work.

The vulnerability exists in PHP session handling with file-based storage, which is the default when session.save_handler equals files. Depthfirst says an attacker who controls session-file data and interrupts the session write can initiate object deserialization and gain remote code execution.

PHP writes over the session file beginning at the start rather than clearing it first, meaning a halted write leaves old and new data inside the file. Depthfirst reports dependable techniques for disrupting the file write while session upload-progress updates occur, causing the beginning of one valid session to connect with the end of another. “We discovered reliable methods to interrupt the file operation during session upload-progress updates,” Depthfirst said.

On the server’s next use of the session, it accepts the damaged file as legitimate state, which lets attackers manage session values and begin object deserialization. Through blending new and old session data, an attacker can cause ordinary strings to behave as serialized object data that a subsequent session builds and executes.

PHP says session upload progress offers a remote client one method for altering stored session data via multipart uploads, and keeping large user-controlled strings in a session can produce the same problem. PHP says that in threaded builds, a hard memory-limit failure elsewhere can terminate the process while a session write is underway.

Attackers require default session storage to be active, an entry point such as upload progress tracking, a PHP process halted during a write, a request invoking session_start() on the damaged file, and a route from deserialization to code execution. SecurityWeek reports no known exploitation of phpAfterShell in the wild.

PHP2Shell denotes two critical flaws identified as CVE-2026-109618 and CVE-2026-109619, revealed roughly a month ahead of the Nov. 19, 2026 patches. phpAfterShell connects to PHP2Shell, which took place when PHP’s upload-progress callback was able to reach a file-backed session before the target script launched during processing of an unauthenticated multipart request.

Following PHP2Shell, PHP limited the objects that could be created in memory while leaving the core file update behavior as it was. Despite those restrictions, the callback continues to read the current session, append upload-progress state, serialize it, and write it back into the same file.

During the weeks following the PHP2Shell disclosure, security researchers recorded actual exploitation attempts and breaches aimed at internet-facing systems. Check Point reported campaigns that exploited PHP2Shell against its own security gateways, with activity reaching back to Oct. 30, 2026. Backdoors and destructive tools were deployed in attacks targeting VMware ESXi virtualization servers. Attackers also set their sights on Palo Alto Networks firewalls that expose administrative interfaces to the internet.

PHP revealed a flaw in session upload progress that enables remote code execution, identified as CVE-2026-115560 on Oct. 23, 2026, two days after emergency fixes for PHP2Shell. PHP says exploiting CVE-2026-115560 calls for a precise and improbable set of conditions. Successful exploitation might allow a remote attacker to read login credentials and customer records, alter session data, monitor visitors, or interrupt the service.

Affected releases include PHP 8.5 before 8.5.13, PHP 8.4 before 8.4.28, PHP 8.3 before 8.3.37, and PHP 8.2 before 8.2.36, while 8.1 and earlier releases have reached end-of-life. The patches published on Nov. 19, 2026 belong to PHP’s standard four-week release cycle and arrived in versions 8.2.36, 8.3.37, 8.4.28, 8.5.13, and 8.6. The PHP team provided users with advance notice of the vulnerabilities and fixes on Nov. 18, 2026.

Kevin Dunglas, the creator, said on X that refreshed FrankenPHP builds are being produced alongside The PHP Foundation and Docker, spanning standalone binary files, container images built for Debian and Alpine, Homebrew packages, and RPM and DEB packages. Laravel said on X that preparations for a remediation plan were already underway across its hosting and deployment platforms. The PHP Foundation issued patches for 18 vulnerabilities, seven of them critical, affecting supported PHP versions but demanding non-default configuration or uncommon setups for exploitation.

Was this helpful?

Join the discussion

Please read our Comment Policy before commenting. First-time comments are held for moderation. By posting a comment you agree to our Terms of Use and Privacy Policy, which explain how your name, email address and comment are used.

Your email address will not be published. Required fields are marked *