You are likely affected if you run PHP 8.5 before 8.5.12, 8.4 before 8.4.27, 8.3 before 8.3.36 or 8.2 before 8.2.35 under PHP-FPM, Apache mod_php, php-cgi, FrankenPHP or LiteSpeed. PHP 8.1 and older no longer get fixes from the PHP project, so treat them as exposed unless your distribution has backported a patch. Check appliances, containers and third-party products that bundle PHP as well.
What PHP2Shell means for your exposure
PHP2Shell is a patch-status question first, not a generic vulnerability theme. If your estate runs one of the listed PHP branches in a supported SAPI, the practical answer is simple: determine whether the installed build is at or above the fixed release, then verify whether any bundled or embedded PHP runtime inside appliances, containers, or third-party products still ships an older vulnerable version.
The detail that matters most is runtime context. A server can look current at the OS package layer and still remain exposed if the application stack includes an older PHP binary, a separate FPM pool, or a vendor image that was built before the fix landed. That is why “affected” should be judged by deployed runtime, not by the package inventory alone.
For operational follow-up, the most useful first check is whether you can enumerate every place PHP runs, including web front ends, background jobs, admin appliances, and container images. If you cannot prove the PHP version in each location, treat that system as still needing verification.
How to confirm exposure without guessing
Start from the exact PHP runtime that serves requests, not just from the host operating system. Version drift often appears when the same application is deployed across multiple SAPIs or when a product vendor ships its own embedded PHP copy. The simplest verification path is to check the live binary, the package metadata, and the product documentation side by side, then compare that result with the advisory that describes the affected branches.
PHP2Shell is the right starting point if you need the full affected-version picture, because it is organised around the runtime branches, SAPIs, patch status, and interim mitigation options that decide whether a system is exposed.
If you are already inventorying software components, pair the version check with release-level evidence. SBOM-driven review is especially useful here because a product may include PHP indirectly, through an appliance image or vendor bundle, long after the upstream package team has updated the base OS.
SBOM operations help when exposure is hidden inside images, vendor bundles, or multi-stage deployments, because they turn “maybe affected” into a component-level answer you can verify and track.
What to do if you cannot patch immediately
If you cannot move to a fixed build right away, the next question is which deployment path is actually exposed. SAPIs, web server integrations, and product packaging matter because they determine whether the vulnerable code path is reachable in practice and how much of the service is at risk while you wait for maintenance.
That is why the temporary goal is not “do nothing until patching is convenient.” It is to narrow exposure, remove unneeded PHP entry points, and reduce the number of systems that can invoke the affected runtime. In parallel, isolate the affected service as much as possible so a delayed patch does not become a broad exposure problem.
NIST National Vulnerability Database remains a useful reference point for validating the public record of the issue, while vendor advisories should be used for the exact fixed-build guidance that applies to your distribution or product build.
For teams running larger estates, the key is not to rely on a one-time scan. Re-check after patch windows, after image rebuilds, and after any vendor update, because the real risk is configuration drift that reintroduces an older PHP runtime later.
Risk and Threat Considerations
The main risk is not simply that a vulnerable PHP branch exists somewhere in the estate, but that web-facing runtimes are easy to overlook and often sit behind products, containers, and appliances that do not follow the normal patch workflow. That creates a high chance of silent exposure, especially where PHP is bundled rather than separately managed.
Failure mechanism: An outdated PHP runtime remains reachable through a supported web server or application stack, while operators trust the host patch level or the vendor label instead of the actual runtime version and SAPI in use.
Impact: Attackers who can reach the exposed PHP path may gain remote code execution or equivalent server-side compromise, which can lead to webshells, data theft, lateral movement, or full application takeover depending on what the PHP process can access.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP API Security Top 10 addresses the attack and risk surface, while OWASP ASVS, CIS Controls v8 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP ASVS | V13 — Configuration | PHP exposure hinges on deployed runtime configuration and version drift. |
| Recommendation — Verify deployed PHP versions and runtime settings across every environment and image. | ||
| CIS Controls v8 | CIS-7 — Continuous Vulnerability Management | Affected-version checking and patch validation are core vulnerability management tasks. |
| Recommendation — Continuously inventory PHP runtimes and remediate any system still on an affected build. | ||
| NIST SP 800-53 Rev 5 | SI-2 — Flaw Remediation | This issue requires timely remediation of a known software flaw in production runtimes. |
| CM-8 — System Component Inventory | You must identify every host, container, and product that bundles PHP to assess exposure. | |
| Recommendation — Track and apply the vendor fix to all PHP runtimes and embedded copies without delay. Maintain an inventory of all systems and products that include PHP. | ||
| OWASP API Security Top 10 | API8 — Security Misconfiguration | Misconfigured or drifted web runtimes can leave vulnerable PHP paths exposed. |
| Recommendation — Remove outdated PHP deployments and lock runtime configurations to approved versions. | ||
Practitioner Guidance
What to verify: Confirm the exact PHP build in production, the SAPI or integration mode, and whether any appliance or container image bundles its own copy. If you only have host-level inventory, assume the exposure question is still unanswered.
Decision rule: If the system runs a listed PHP branch and you cannot prove it is at a fixed release, treat it as exposed until the runtime is verified or replaced. If patching is blocked, reduce reachability first, then schedule remediation.
Practitioner takeaway: The important judgement is to validate the live runtime, not the expected one, because bundled PHP and deployment drift are the two most common reasons vulnerable versions survive after a patch announcement.
Related resources from NHI Mgmt Group
- How should organisations govern access when identity controls are spread across IGA, AM, and PAM?
- How do security teams prioritise Linux kernel fixes when multiple distributions are affected?
- Why do support environments matter to identity governance if production was not affected?
- Who is accountable for DDoS resilience when identity and access services are affected?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 3, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org