CVE-2007-1382: Safe Mode Bypass via WScript.Shell in PHP COM Extensions
- Vendor
- PHP Group
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.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
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.
Mitigation
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.
Remediation
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.
Exploits
No validated public exploits yet. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Frequently asked questions
- Is CVE-2007-1382 exploited in the wild?
- As of Oct 16, 2026, Mallory has no reports of CVE-2007-1382 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2007-1382?
- As of Oct 16, 2026, Mallory has not confirmed a public exploit for CVE-2007-1382. 1 candidate exploit record is not yet analyzed.
- Is there a patch for CVE-2007-1382?
- Upgrade to a version of PHP where this issue is patched. Alternatively, disable the COM extension in php.ini if it is not required.
- What products are affected by CVE-2007-1382?
- PHP Group Com Extensions.
- How severe is CVE-2007-1382?
- CVE-2007-1382 has a CVSS v2 score of 6.8 (Medium) and an EPSS score of 1.6% (77th percentile) as of Oct 16, 2026.
Recent activity
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.