Vulnerability library
Security checkNovember 04, 2026

PHP2Shell

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

High severityPHP2ShellPHPRCE

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

PHP2Shell is a family of critical memory-safety vulnerabilities in the PHP runtime that can allow remote attackers to execute arbitrary code or disclose sensitive process memory under affected conditions. The vulnerabilities arise from improper handling of memory and internal state during error conditions, potentially resulting in memory corruption or use-after-free behavior. Exploitation may allow unauthenticated attackers to compromise the server, access sensitive information such as credentials and API keys, or disrupt application availability. The vulnerabilities affect the PHP runtime itself and are not limited to specific frameworks or content management systems. Exposure depends on the PHP version, applicable security patches, runtime configuration, and deployment environment.

Recommendation

Identify all PHP runtimes used by the application and upgrade each affected runtime to a release containing the PHP2Shell security fixes, or install a verified vendor-provided security patch for the deployed package. Restart PHP workers and relevant services after patching to ensure the corrected runtime is loaded. Review all deployment environments, including containers, background workers, PHP-FPM pools, and standalone PHP processes. If immediate patching is not possible, apply vendor-recommended temporary mitigations and consider restricting exposure of affected services until remediation is complete. Review PHP memory and request-size settings as additional hardening measures, but do not treat configuration changes or web application firewall rules as substitutes for patching. If the system was exposed while vulnerable, investigate for signs of exploitation and consider rotating potentially exposed credentials and secrets.

References

Could your website be exposed too?

SmartScanner can check your website for PHP2Shell and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated November 04, 2026