PHP2Shell — Critical Remote Code Execution Vulnerability
The text claims two memory-corruption flaws in the PHP runtime, dubbed PHP2Shell, that under certain build and configuration conditions may let an unauthenticated attacker run arbitrary commands on a server. It does not demonstrate exploitation, only describes how to check whether a deployed PHP version is affected.
Published on medium.com
PHP2Shell refers to two vulnerabilities involving memory corruption and improper handling of internal runtime state in PHP. Under certain conditions, these vulnerabilities may allow an unauthenticated attacker to execute arbitrary commands on a vulnerable server.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely memory corruption and mishandling of internal runtime state in the PHP interpreter, though the text does not describe the specific coding mistake.
Impact
If the runtime is affected and configured in a vulnerable way, an attacker could run commands as the PHP process and may reach files, credentials and customer data, or disrupt availability; the text stresses that an affected PHP version alone does not prove a given application is exploitable.
What the attacker needed
Vulnerable PHP build and configuration; unauthenticated network access to the server
The fix
The PHP runtime should be upgraded to a security-fixed release or the vendor-provided patched package, and the active runtime confirmed afterwards.
How it was found
- Identify the PHP runtime used by the application.
- Check the installed package against the official PHP2Shell security advisory.
- Verify whether the vendor has applied a security patch or backported a fix.
- Conduct authorized validation in a controlled environment.
- Record the results and retain supporting screenshots.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
PHP is the software that runs many websites. The text says that in some versions of PHP there are bugs in how it handles memory, and that these bugs might let someone run their own commands on the server. However, the text does not actually show this happening; it only says you should check which PHP version a site uses and whether it has been patched.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.