On October 21, 2026, PHP fixed two critical PHP2Shell vulnerabilities (CVSS 9.2) that enable pre-auth RCE with a single HTTP request, before any application code runs. Imperva had the details from the researchers ahead of disclosure, and its customers were protected before exploitation began.
Technical background
Both flaws arise after memory_limit is exhausted or a fatal error occurs: request-owned state is not cleaned up correctly, and the next request on the same worker operates on a dangling pointer. PHP-FPM, mod_php (highest risk), php-cgi, FrankenPHP, and LiteSpeed are all affected.
- CVE-2026-109619: use-after-free in the fatal error backtrace and type confusion in OPcache.
- CVE-2026-109618: use-after-free in session upload progress and a memory leak during multipart parsing, even without
session_start().
Imperva was prepared in advance
Imperva had the PHP2Shell details as part of coordinated disclosure, validated its detection rules, and monitored customer traffic before the announcement. That made the difference: Amazon detected the first exploitation attempt as early as October 17, and after the October 21 disclosure, attacks ramped up within hours.
Imperva WAF blocks the exploit vectors with a virtual patch in front of the PHP runtime. This is crucial, because the exploit fires before the application code does.
In the independent SecureIQLab 2026 Cloud WAAP test, Imperva achieved 100% security efficacy and 100% false positive avoidance among 12 vendors.
Recommended steps
- Patch to 8.5.12 / 8.4.27 / 8.3.36 / 8.2.35; for 7.4–8.1, use source backports or an LTS vendor.
- Temporarily, if you can’t patch right away: set
session.upload_progress.enabled = 0, consideropcache.enable = 0, and review backtraces on fatal errors. - Apply a virtual patch via WAF and least privilege for the PHP process.
- Monitor for:
Allowed memory size exhausted, worker crashes, HTTP 500 errors, large multipart payloads, and malformedPHPSESSIDvalues.
Need to assess your exposure or deploy protection? Contact us.
Sources: PHP2Shell: When PHP Runs Out of Memory at the Wrong Moment (Imperva, Oct 21, 2026) · PHP2Shell: AI uncovers critical RCE vulnerabilities (Wiz) · PHP2Shell: Critical PHP vulnerabilities patched (Help Net Security, Oct 21, 2026) · Someone Tried to Exploit PHP2Shell 4 Days Before Disclosure (The Hacker News, Oct 22, 2026) · SecureIQLab 2026 Cloud WAAP CyberRisk Validation Report