PHP Remote File Inclusion in PHP Image 1.2 (xarg parameter)
CVE-2007-5697 describes multiple remote file inclusion (RFI) vulnerabilities in PHP Image 1.2. The vulnerabilities exist in the scripts xarg_corner.php, xarg_corner_bottom.php, and xarg_corner_top.php, which fail to properly sanitize the 'xarg' parameter. This allows remote attackers to include and execute arbitrary PHP code hosted on external servers by supplying a crafted URL to the vulnerable parameter.
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.
Successful exploitation allows remote attackers to execute arbitrary PHP code on the affected server, potentially leading to full compromise of the system, data theft, or use of the server as a platform for further attacks.
If you can’t patch tonight, do this now.
Disable allow_url_fopen and allow_url_include in the PHP configuration to prevent remote file inclusion. Employ input validation to restrict the 'xarg' parameter to only allow expected values. Use web application firewalls to detect and block malicious requests targeting RFI vulnerabilities.
Patch, then assume compromise.
Upgrade to a fixed version of PHP Image that properly sanitizes user input for file inclusion. If no patch is available, manually review and modify the affected scripts to ensure that user-supplied input is not used directly in file inclusion functions without proper validation and sanitization.
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.