PHP2Shell: Critical PHP Vulnerabilities Expose Websites to Remote
Two memory-safety flaws in PHP's core engine, one in out-of-memory error handling and one involving improperly retained internal memory state, could let unauthenticated attackers run code on affected servers. Researchers demonstrated remote code execution against WordPress, Drupal and Joomla deployments running vulnerable PHP versions.
Published on mraviteja9949.medium.com
Security researchers have uncovered critical vulnerabilities in PHP, a widely used programming language powering platforms such as WordPress, Drupal, Joomla, and MediaWiki.
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-safety errors in PHP's core engine: faulty handling of out-of-memory errors and internal memory state that is kept after it should be released, allowing use of freed memory.
Impact
Unauthenticated attackers could execute commands on vulnerable servers, read secrets such as passwords and tokens from server memory, and potentially take control of affected systems; the text does not describe any defence that blocked exploitation.
What the attacker needed
Target runs an affected PHP version; no authentication needed
The fix
The PHP development team released security updates on 21 October 2026 (versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35), and organisations should apply them, with temporary mitigations only reducing exposure.
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, including WordPress and Joomla. These bugs are mistakes in how PHP manages its own memory, the working space it uses while running. Because the mistake is in PHP itself rather than in the website's code, a site can be at risk even if its own code is written carefully, and an attacker may be able to run their own commands on the server.
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.