TL;DR: Critical PHP2Shell flaws let unauthenticated attackers run code on web-serving PHP installations, according to Lansweeper's vulnerability data set. PHP runtimes that serve requests directly need exposure-aware prioritisation, because the attack can land before application logic adds any protection.
Editorial analysis by NHI Mgmt Group, based on content published by Lansweeper: “PHP2SHELL Vulnerability”.
Key questions
Q: Why does embedded PHP execution increase remote code risk?
A: Embedded PHP execution increases remote code risk because attacker-controlled input can reach the interpreter inside the web server process.
Q: How do php-fpm and mod_php differ in exposure?
A: php-fpm and mod_php differ in exposure because php-fpm runs PHP in separate worker processes, while mod_php embeds the interpreter in the web server process.
Q: What should teams do first when PHP runs as mod_php?
A: When mod_php is active, first confirm which Apache MPM and PHP module are loaded, then verify whether PHP executes inside the web server process.
Practitioner guidance
- Map PHP by runtime mode, not just version Inventory each host with the actual SAPI, handler, and web-serving path so vulnerable instances are separated from CLI-only or non-exposed installs.
- Prioritise mod_php and other embedded handlers first Treat in-process web server handlers as the first remediation tier because they place PHP closest to the request path and reduce containment.
- Verify the real patch state on every branch Confirm package changelogs, backports, and distro notices rather than trusting version banners, especially where vendors ship patched builds under older branch numbers.
Bottom line: PHP2Shell matters because web-serving PHP runtimes can expose remote code execution before application controls have any chance to intervene.
Glossary terms: PHP2Shell, Server API, Remote Code Execution (RCE), Apache Mod_PHP
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
PHP2Shell is really an exposure-path problem, not just a patching problem. The same vulnerable version behaves differently depending on how requests reach it, which means inventory quality is part of the control plane. Organisations that cannot separate CLI-only PHP from web-serving runtimes will overestimate their safety and under-prioritise the hosts that attackers can actually reach.
A question worth separating out:
Q: How can asset inventories spot vulnerable PHP runtimes faster?
A: Asset inventories spot vulnerable PHP runtimes faster when they record the PHP version, SAPI, and handler type for each host or container. That lets teams find outdated interpreter builds, identify mod_php versus php-fpm exposure, and prioritise systems where the web server process can execute PHP directly.
👉 Read our full editorial: PHP2Shell exposes mod_php to unauthenticated remote code execution