CVE-2007-5697: PHP Remote File Inclusion in PHP Image 1.2 (xarg parameter)
- Vendor
- Phpimage
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.
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.
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.
Mitigation
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.
Remediation
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.
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.
References
Frequently asked questions
- Is CVE-2007-5697 exploited in the wild?
- As of Oct 16, 2026, Mallory has no reports of CVE-2007-5697 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2007-5697?
- Yes. As of Oct 16, 2026, Mallory has reports of a public exploit for CVE-2007-5697.
- Is there a patch for CVE-2007-5697?
- 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.
- What products are affected by CVE-2007-5697?
- Phpimage Php Image.
- How severe is CVE-2007-5697?
- CVE-2007-5697 has a CVSS v2 score of 6.8 (Medium) and an EPSS score of 2.3% (84th percentile) as of Oct 16, 2026.
Recent activity
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.