CVE-2007-4528

PHP 5.0.5 - Remote Code Execution via FFI Extension DLL Loading

Title source: manual
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2007-4528. PoCs published by NetJackal.

AI-analyzed exploit summary This exploit bypasses PHP's safe_mode by leveraging the FFI extension to execute arbitrary commands via WinExec from kernel32.dll. It writes command output to a temporary file and displays it to the attacker.

Description

The Foreign Function Interface (ffi) extension in PHP 5.0.5 does not follow safe_mode restrictions, which allows context-dependent attackers to execute arbitrary code by loading an arbitrary DLL and calling a function, as demonstrated by kernel32.dll and the WinExec function. NOTE: this issue does not cross privilege boundaries in most contexts, so perhaps it should not be included in CVE.

Exploits (1)

exploitdb WORKING POC VERIFIED
by NetJackal · phplocalwindows
https://www.exploit-db.com/exploits/4311

This exploit bypasses PHP's safe_mode by leveraging the FFI extension to execute arbitrary commands via WinExec from kernel32.dll. It writes command output to a temporary file and displays it to the attacker.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: PHP with FFI extension (tested on PHP 5.0.5)
No auth needed
Prerequisites: FFI extension loaded · Writeable directory (current, session.save_path, or upload_tmp_dir)
devstral-2 · analyzed Feb 16, 2026 Full analysis →

References (1)

Core 1
Core References
Exploit, Third Party Advisory exploit x_refsource_exploit-db
https://www.exploit-db.com/exploits/4311

Scores

EPSS 0.0470
EPSS Percentile 90.6%

Details

Status published
Products (1)
php/php 5.0.5
Published Aug 25, 2007
Tracked Since Feb 18, 2026