{"id":"CVE-2007-3997","aliases":["EUVD-2007-3981","GHSA-966w-852v-c3c4"],"status":"published","title":"The (1) MySQL and (2) MySQLi extensions in PHP 4 before 4.4.8, and PHP 5 before 5.2.4, allow...","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.","severity":{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.13818,"percentile":0.96545,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":false},"cwes":["CWE-264"],"published":"2007-09-04T18:00:00Z","modified":"2026-06-16T22:43:12Z","exploits":[{"source":"exploitdb","id":"EDB-4392","title":"PHP 4.4.7/5.2.3 - MySQL/MySQLi 'Safe_Mode' Bypass","type":"local","platform":"multiple","date":"2007-09-10","verified":true,"url":"https://www.exploit-db.com/exploits/4392"}],"products":[{"vendor":"php","product":"php"}],"references":[{"url":"https://exchange.xforce.ibmcloud.com/vulnerabilities/39402","tags":["vdb-entry","x_refsource_XF","x_transferred","Third Party Advisory","VDB Entry"]},{"url":"http://secunia.com/advisories/26822","tags":["third-party-advisory","x_refsource_SECUNIA","x_transferred","Third Party Advisory"]},{"url":"http://www.vupen.com/english/advisories/2008/0059","tags":["vdb-entry","x_refsource_VUPEN","x_transferred","Permissions Required","Third Party Advisory"]},{"url":"http://www.gentoo.org/security/en/glsa/glsa-200710-02.xml","tags":["vendor-advisory","x_refsource_GENTOO","x_transferred","Third Party Advisory"]},{"url":"http://www.php.net/releases/4_4_8.php","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory"]},{"url":"http://www.php.net/ChangeLog-5.php#5.2.4","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory"]},{"url":"http://www.trustix.org/errata/2007/0026/","tags":["vendor-advisory","x_refsource_TRUSTIX","x_transferred","Broken Link"]},{"url":"https://issues.rpath.com/browse/RPL-1693","tags":["x_refsource_CONFIRM","x_transferred","Broken Link"]},{"url":"http://securityreason.com/securityalert/3102","tags":["third-party-advisory","x_refsource_SREASON","x_transferred","Exploit","Third Party Advisory"]},{"url":"http://secweb.se/en/advisories/php-mysql-safe-mode-bypass-vulnerability/","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory"]},{"url":"https://issues.rpath.com/browse/RPL-1702","tags":["x_refsource_CONFIRM","x_transferred","Broken Link"]},{"url":"http://secunia.com/advisories/26838","tags":["third-party-advisory","x_refsource_SECUNIA","x_transferred","Third Party Advisory"]},{"url":"https://exchange.xforce.ibmcloud.com/vulnerabilities/36384","tags":["vdb-entry","x_refsource_XF","x_transferred","Third Party Advisory","VDB Entry"]},{"url":"http://secunia.com/advisories/27377","tags":["third-party-advisory","x_refsource_SECUNIA","x_transferred","Third Party Advisory"]},{"url":"https://www.exploit-db.com/exploits/4392","tags":["exploit","x_refsource_EXPLOIT-DB","x_transferred","Third Party Advisory","VDB Entry"]},{"url":"http://www.php.net/ChangeLog-4.php","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory"]},{"url":"http://secunia.com/advisories/27102","tags":["third-party-advisory","x_refsource_SECUNIA","x_transferred","Third Party Advisory"]},{"url":"http://www.vupen.com/english/advisories/2007/3023","tags":["vdb-entry","x_refsource_VUPEN","x_transferred","Permissions Required","Third Party Advisory"]},{"url":"http://www.php.net/releases/5_2_4.php","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory"]},{"url":"http://secunia.com/advisories/28318","tags":["third-party-advisory","x_refsource_SECUNIA","x_transferred","Third Party Advisory"]},{"url":"http://secunia.com/advisories/26642","tags":["third-party-advisory","x_refsource_SECUNIA","x_transferred","Third Party Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2007-3997"},{"url":"http://secweb.se/en/advisories/php-mysql-safe-mode-bypass-vulnerability"},{"url":"http://www.trustix.org/errata/2007/0026"},{"url":"https://github.com/advisories/GHSA-966w-852v-c3c4"}],"sources":{"cve":[{"id":"CVE-2007-3997","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.","status":"published","published":"2007-09-04T18:00:00Z","modified":"2024-08-07T14:37:06.033Z","updated_at":"2026-11-02T13:32:56.730199Z"}],"euvd":[{"id":"EUVD-2007-3981","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.","status":"published","published":"2007-09-04T18:00:00Z","modified":"2024-08-07T14:37:06Z","updated_at":"2026-11-03T01:16:23.468985Z"}],"ghsa":[{"id":"GHSA-966w-852v-c3c4","title":"The (1) MySQL and (2) MySQLi extensions in PHP 4 before 4.4.8, and PHP 5 before 5.2.4, allow...","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.","status":"published","published":"2022-05-01T18:19:22Z","modified":"2025-04-09T03:45:48Z","updated_at":"2026-11-02T15:00:55.004058Z"}],"nvd":[{"id":"CVE-2007-3997","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.","status":"published","published":"2007-09-04T18:17:00Z","modified":"2026-06-16T22:43:12.497Z","cvss":[{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-264"],"updated_at":"2026-11-02T14:01:19.102336Z"}]}}
