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

DevFeed: [PHP2Shell. What is it and What Do You Need to Do?](<https://devfeed.tech/articles/php2shell-what-is-it-and-what-do-you-need-to-do-129459.md>)

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

Author: Matthew Setter

Published: 2026-11-11T00:00:00Z

Content type: article

Language: en

Sources: [Twilio](<https://devfeed.tech/sources/twilio-blog.md>), [Twilio Blog](<https://devfeed.tech/sources/twilio-blog-2.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [known exploitable vulnerabilities](<https://devfeed.tech/topics/known-exploitable-vulnerabilities.md>), [Linux Kernel](<https://devfeed.tech/topics/linux-kernel.md>), [free software](<https://devfeed.tech/topics/free-software.md>)

Tags: [apache](<https://devfeed.tech/tags/apache.md>), [app-security](<https://devfeed.tech/tags/app-security.md>), [apt](<https://devfeed.tech/tags/apt.md>), [audit](<https://devfeed.tech/tags/audit.md>), [aws](<https://devfeed.tech/tags/aws.md>), [backports](<https://devfeed.tech/tags/backports.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [calif](<https://devfeed.tech/tags/calif.md>), [campaign](<https://devfeed.tech/tags/campaign.md>), [censys](<https://devfeed.tech/tags/censys.md>), [cgroup-v2](<https://devfeed.tech/tags/cgroup-v2.md>), [chaining](<https://devfeed.tech/tags/chaining.md>), [check-point](<https://devfeed.tech/tags/check-point.md>), [cloudflare](<https://devfeed.tech/tags/cloudflare.md>), [code-execution](<https://devfeed.tech/tags/code-execution.md>), [common-vulnerability-scoring-system](<https://devfeed.tech/tags/common-vulnerability-scoring-system.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [developer-insights](<https://devfeed.tech/tags/developer-insights.md>), [exploit](<https://devfeed.tech/tags/exploit.md>), [php](<https://devfeed.tech/tags/php.md>), [php2shell](<https://devfeed.tech/tags/php2shell.md>), [security](<https://devfeed.tech/tags/security.md>)

## AI overview

PHP2Shell combines two critical, unauthenticated remote-code-execution flaws affecting PHP versions back to 5.4. One stems from memory corruption when a request reaches PHP's memory limit; the other from stale worker state after a fatal error. The article urges organizations to inventory every PHP installation and upgrade promptly to a patched release, including rebuilding containers. Where upgrades are blocked, it summarizes PHP.net mitigations: adjust memory and request-size limits for the first flaw; disable upload-progress tracking, address fatal errors and timeouts, and prevent per-request configuration overrides for the second. Restart workers after configuration changes. The article cites extensive reported exploitation and many installations still affected, while noting the mitigations reduce risk rather than replace patching.

## Source excerpt

You don't need to be a PHP developer or a systems administrator to have heard about the PHP2Shell exploit. In this post, learn what it is and what you need to do going forward.