The PHP Foundation released PHP 8.5.13, 8.4.28, 8.3.37, and 8.2.36 today, patching seven critical vulnerabilities across all supported branches. Among them: a newly discovered session-handling flaw and two incomplete fixes from last month's PHP2Shell emergency patch.

The new vulnerability, CVE-2026-126714, was discovered by security startup Depthfirst using its AI-powered vulnerability research platform. The firm has named it phpAfterShell. The flaw carries a CVSS score of 9.2.

Depthfirst researcher Leo Lin told Forbes his team started with a hunch that the same PHP code targeted by October's PHP2Shell exploits was vulnerable to additional attacks. Lin, formerly at Apple and Snap, used Depthfirst's AI to brainstorm possible weaknesses.

How phpAfterShell Works

The vulnerability is a time-of-check time-of-use (TOCTOU) bug in PHP's default file-based session storage. If a write operation to a session file is interrupted at a specific moment, PHP may leave behind a malformed file containing pieces of two sessions. When the application later calls session_start(), it unpacks this corrupted data as attacker-controlled objects.

Advertisement

Depthfirst said in its disclosure that chaining this deserialization primitive with another of its PHP-native findings leads directly to remote code execution. The flaw affects any application running an affected PHP version with file-based sessions, which is the default configuration.

PHP and Depthfirst Disagree on Severity

PHP's advisory states that the critical issues require non-default configuration or uncommon setups. Depthfirst CEO Qasim Mithani disagrees. He told Forbes that the exploits work on PHP setups using the default configuration.

The divergence matters. If the PHP Foundation's assessment is correct, the attack surface is limited to administrators who have changed defaults. If Mithani is right, every unpatched PHP installation running file-based sessions is at risk.

Also Fixed: Incomplete PHP2Shell Patches

Today's release also addresses CVE-2026-129481 and CVE-2026-129182, two use-after-free vulnerabilities that bypassed the October patches for PHP2Shell. CVE-2026-129481 affects PHP 8.3 through 8.5. CVE-2026-129182 affects only PHP 8.5.

Advertisement

PHP2Shell, which hit on October 21, was itself discovered with AI assistance. That pair of flaws allowed unauthenticated attackers to run code on PHP web servers and was added to CISA's Known Exploited Vulnerabilities catalog within five days. GreyNoise reported over 1,100 successful exploitations from five IP addresses by early November. Check Point later disclosed that attackers had used PHP2Shell to compromise its Mobile Access portals and deploy wipers against Israeli organizations.

What to Do

Administrators running PHP 8.2.x through 8.5.x should update to 8.2.36, 8.3.37, 8.4.28, or 8.5.13 immediately. Internet-facing Apache mod_php servers are the highest priority. For those who cannot patch, the PHP Foundation advises disabling session.upload_progress.

PHP 8.1 and older receive no official updates. The third-party repository maintained by Ondřej Surý shipped builds for dead branches today, including PHP 8.6.0.