What’s Vulnerable › Vulnerabilities
CVE-2007-3997
- Severity: high (CVSS 7.5 v2.0)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 13.8% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2007-09-04 · updated 2026-06-16
- Weakness: CWE-264
Description
The (1) MySQL and (2) MySQLi extensions in PHP 4 before 4.4.8, and PHP 5 before 5.2.4, allow remote attackers to bypass safe_mode and open_basedir restrictions via MySQL LOCAL INFILE operations, as demonstrated by a query with LOAD DATA LOCAL INFILE.
Affected products
- PHP: from 4.0.0 before 4.4.8; from 5.0.0 before 5.2.4 — fixed in 4.4.8, 5.2.4
How to fix
Upgrade to a fixed version: PHP 4.4.8, 5.2.4. Check the vendor advisory for mitigations.
References
- http://secunia.com/advisories/26642
- http://secunia.com/advisories/26822
- http://secunia.com/advisories/26838
- http://secunia.com/advisories/27102
- http://secunia.com/advisories/27377
- http://secunia.com/advisories/28318
- http://securityreason.com/securityalert/3102
- http://secweb.se/en/advisories/php-mysql-safe-mode-bypass-vulnerability/
- http://www.gentoo.org/security/en/glsa/glsa-200710-02.xml
- http://www.php.net/ChangeLog-4.php
- http://www.php.net/ChangeLog-5.php#5.2.4
- http://www.php.net/releases/4_4_8.php
Get alerted when CVE-2007-3997 or the next vulnerability affects your stack