Safe Mode Bypass via WScript.Shell in PHP COM Extensions
The PHP COM extensions on Windows allow attackers to execute arbitrary code by instantiating the WScript.Shell COM object and invoking its Run method, such as to launch cmd.exe. This bypasses PHP's safe mode restrictions, which are intended to limit the execution of potentially dangerous operations in shared hosting environments.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Attackers can execute arbitrary commands on the underlying Windows system, completely bypassing PHP's safe mode. This can lead to full system compromise, data theft, or further exploitation, especially in shared hosting environments where safe mode is relied upon for isolation.
If you can’t patch tonight, do this now.
Disable the COM extension in the PHP configuration (php.ini) if not needed. Restrict access to PHP scripts that could instantiate COM objects. Use OS-level controls and proper privilege separation to limit the impact of PHP code execution.
Patch, then assume compromise.
Upgrade to a version of PHP where this issue is patched. Alternatively, disable the COM extension in php.ini if it is not required. Ensure that safe mode is not solely relied upon for security, as it is deprecated and insufficient for robust isolation.
No validated public exploits yet. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.