---
title: "PHP2Shell. What is it and What Do You Need to Do?"
description: "PHP2Shell combines two critical RCE vulnerabilities, CVE-2026-109618 and CVE-2026-109619, affecting every PHP version back to 5.4. The first exploit corrupts memory when a request hits PHP’s memory limit at the wrong moment, while the second leverages stale global state after a fatal error. Both are rated 9.2 on the CVSS 4.0 scale and require no authentication. Exploitation has been confirmed in the wild, including a campaign that chained PHP2Shell with a Linux privilege-escalation flaw to root 25 servers. The post provides a remediation guide covering inventory, patching to PHP 8.5.12 or later, configuration workarounds, and long-term security practices."
---

# PHP2Shell. What is it and What Do You Need to Do?

[Twilio](https://yomu.fyi/company/twilio) · Matthew Setter · Nov 11, 2026

**Type:** Incident / postmortem

## Summary

PHP2Shell combines two critical RCE vulnerabilities, CVE-2026-109618 and CVE-2026-109619, affecting every PHP version back to 5.4. The first exploit corrupts memory when a request hits PHP’s memory limit at the wrong moment, while the second leverages stale global state after a fatal error. Both are rated 9.2 on the CVSS 4.0 scale and require no authentication. Exploitation has been confirmed in the wild, including a campaign that chained PHP2Shell with a Linux privilege-escalation flaw to root 25 servers. The post provides a remediation guide covering inventory, patching to PHP 8.5.12 or later, configuration workarounds, and long-term security practices.

## Context

The post describes the PHP2Shell exploit, a combination of two critical RCE vulnerabilities (CVE-2026-109618 and CVE-2026-109619) affecting all PHP versions back to 5.4. It details how the exploits were discovered, their severity (CVSS 9.2), and confirmed exploitation in the wild, including a campaign that chained PHP2Shell with a Linux privilege-escalation flaw to root 25 servers. The post provides a step-by-step remediation guide covering inventory, patching, configuration workarounds, and long-term security practices.

## Takeaways

- PHP2Shell is a combination of two unauthenticated RCE exploits (CVE-2026-109618 and CVE-2026-109619) affecting all PHP versions back to 5.4, both rated 9.2 on CVSS 4.0.
- Confirmed exploitation includes a campaign that chained PHP2Shell with the Linux privilege-escalation flaw Fragnesia (CVE-2026-46300) to root 25 servers.
- If patching is impossible, setting memory\_limit to -1 and using cgroup v2 memory.max for CVE-2026-109618, and setting max\_input\_vars to 1000 for CVE-2026-109619, can reduce risk but only patching is a complete mitigation.

## FAQ

### What configuration changes help if I cannot patch immediately?

If you cannot upgrade, for CVE-2026-109618 set memory\_limit to -1 and use Linux cgroup v2 memory.max to contain resource consumption. For CVE-2026-109619, set max\_input\_vars to 1000 and max\_input\_nesting\_level to 64. These reduce likelihood but only patching is a complete mitigation.

### Has PHP2Shell been successfully exploited in the wild?

Yes. Mallory confirmed on October 26th that Dream Research reported artifacts of a campaign that rooted 25 servers by chaining PHP2Shell with the Linux kernel privilege-escalation flaw Fragnesia (CVE-2026-46300). Cloudflare, Imperva, Check Point, and AWS also reported exploit attempts in the hundreds of thousands to millions.

**Tags:** [CVE](https://yomu.fyi/topic/cve), [PHP](https://yomu.fyi/topic/php), [RCE](https://yomu.fyi/topic/rce), [Security](https://yomu.fyi/topic/security), [Vulnerabilities](https://yomu.fyi/topic/vulnerabilities)

- Source: [Twilio](https://www.twilio.com/en-us/blog/developers/tutorials/php2shell-what-is-it-what-do-you-need-to-do)
- Source URL: https://www.twilio.com/en-us/blog/developers/tutorials/php2shell-what-is-it-what-do-you-need-to-do
- Ingested by Yomu: 2026-11-12T09:00:16.570Z

[Read original post](https://www.twilio.com/en-us/blog/developers/tutorials/php2shell-what-is-it-what-do-you-need-to-do)
