php safe_mode bypass with MySQL INFILE LOCAL
Published Sep 4, 2007
7.5
HIGHCVSS 2.0
EPSS 13.82%
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
Remediation
Red Hat statement
We do not consider these to be security issues. For more details see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=169857#c1 and https://www.php.net/security-note.php
Metrics
No CVSS v4.0 score for this CVE.
No CVSS v3.1 score for this CVE.
No CVSS v3.0 score for this CVE.
AV:N/AC:L/Au:N/C:P/I:P/A:P
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
2022–2026- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (27 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 13.82% (0.13818) | 96.41th | v5 (v2026.06.15) |
| Jun 15, 2026 | 13.82% (0.13818) | 96.03th | v5 (v2026.06.15) |
| Apr 23, 2026 | 32.05% (0.32052) | 96.84th | v4 (v2025.03.14) |
| Jan 10, 2026 | 30.12% (0.30122) | 96.52th | v4 (v2025.03.14) |
| Dec 28, 2025 | 27.24% (0.27242) | 96.22th | v4 (v2025.03.14) |
| Dec 27, 2025 | 10.16% (0.10164) | 92.91th | v4 (v2025.03.14) |
| Oct 28, 2025 | 27.24% (0.27242) | 96.16th | v4 (v2025.03.14) |
| Oct 27, 2025 | 10.16% (0.10164) | 92.79th | v4 (v2025.03.14) |
| Oct 1, 2025 | 27.24% (0.27242) | 96.25th | v4 (v2025.03.14) |
| Jul 30, 2025 | 9.23% (0.09232) | 92.37th | v4 (v2025.03.14) |
| May 28, 2025 | 21.13% (0.21125) | 95.32th | v4 (v2025.03.14) |
| Mar 30, 2025 | 13.09% (0.13093) | 93.49th | v4 (v2025.03.14) |
| Mar 29, 2025 | 28.25% (0.28253) | 94.43th | v4 (v2025.03.14) |
| Mar 17, 2025 | 13.98% (0.13975) | 93.81th | v4 (v2025.03.14) |
| Mar 16, 2025 | 40.40% (0.40401) | 97.43th | v3 (v2023.03.01) |
| Dec 17, 2024 | 45.83% (0.45828) | 97.49th | v3 (v2023.03.01) |
| Dec 12, 2024 | 7.29% (0.07289) | 94.32th | v3 (v2023.03.01) |
| Sep 22, 2024 | 6.64% (0.06643) | 93.94th | v3 (v2023.03.01) |
| Aug 15, 2024 | 7.68% (0.07678) | 94.28th | v3 (v2023.03.01) |
| Jul 8, 2024 | 5.77% (0.05769) | 93.42th | v3 (v2023.03.01) |
| May 31, 2024 | 5.44% (0.05442) | 93.16th | v3 (v2023.03.01) |
| Apr 23, 2024 | 10.11% (0.10107) | 94.84th | v3 (v2023.03.01) |
| Mar 15, 2023 | 10.31% (0.10310) | 94.01th | v3 (v2023.03.01) |
| Mar 7, 2023 | 12.23% (0.12235) | 94.45th | v3 (v2023.03.01) |
| Mar 6, 2023 | 12.57% (0.12567) | 95.52th | v2 (v2022.01.01) |
| Apr 1, 2022 | 12.57% (0.12567) | 95.18th | v2 (v2022.01.01) |
| Feb 4, 2022 | 12.57% (0.12567) | 90.03th | v2 (v2022.01.01) |
References (25)
- http://secunia.com/advisories/26642 third-party-advisoryx_refsource_SECUNIAThird Party Advisory
- http://secunia.com/advisories/26822 third-party-advisoryx_refsource_SECUNIAThird Party Advisory
- http://secunia.com/advisories/26838 third-party-advisoryx_refsource_SECUNIAThird Party Advisory
- http://secunia.com/advisories/27102 third-party-advisoryx_refsource_SECUNIAThird Party Advisory
- http://secunia.com/advisories/27377 third-party-advisoryx_refsource_SECUNIAThird Party Advisory
- http://secunia.com/advisories/28318 third-party-advisoryx_refsource_SECUNIAThird Party Advisory
- http://securityreason.com/securityalert/3102 third-party-advisoryx_refsource_SREASONExploitThird Party Advisory
- http://secweb.se/en/advisories/php-mysql-safe-mode-bypass-vulnerability/ x_refsource_MISCExploitThird Party Advisory
- http://www.gentoo.org/security/en/glsa/glsa-200710-02.xml vendor-advisoryx_refsource_GENTOOThird Party Advisory
- http://www.php.net/ChangeLog-4.php x_refsource_CONFIRMVendor Advisory
- http://www.php.net/ChangeLog-5.php#5.2.4 x_refsource_CONFIRMVendor Advisory
- http://www.php.net/releases/4_4_8.php x_refsource_CONFIRMVendor Advisory
- http://www.php.net/releases/5_2_4.php x_refsource_CONFIRMVendor Advisory
- http://www.trustix.org/errata/2007/0026/ vendor-advisoryx_refsource_TRUSTIXBroken Link
- http://www.vupen.com/english/advisories/2007/3023 vdb-entryx_refsource_VUPENPermissions RequiredThird Party Advisory
- http://www.vupen.com/english/advisories/2008/0059 vdb-entryx_refsource_VUPENPermissions RequiredThird Party Advisory
- https://access.redhat.com/security/cve/CVE-2007-3997 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=278001 Issue Tracking
- https://exchange.xforce.ibmcloud.com/vulnerabilities/36384 vdb-entryx_refsource_XFThird Party AdvisoryVDB Entry
- https://exchange.xforce.ibmcloud.com/vulnerabilities/39402 vdb-entryx_refsource_XFThird Party AdvisoryVDB Entry
- https://issues.rpath.com/browse/RPL-1693 x_refsource_CONFIRMBroken Link
- https://issues.rpath.com/browse/RPL-1702 x_refsource_CONFIRMBroken Link
- https://nvd.nist.gov/vuln/detail/CVE-2007-3997
- https://www.cve.org/CVERecord?id=CVE-2007-3997
- https://www.exploit-db.com/exploits/4392 exploitx_refsource_EXPLOIT-DBThird Party AdvisoryVDB Entry
| Link | Providers | Tags |
|---|---|---|
| http://secunia.com/advisories/26642 | third-party-advisoryx_refsource_SECUNIAThird Party Advisory | |
| http://secunia.com/advisories/26822 | third-party-advisoryx_refsource_SECUNIAThird Party Advisory | |
| http://secunia.com/advisories/26838 | third-party-advisoryx_refsource_SECUNIAThird Party Advisory | |
| http://secunia.com/advisories/27102 | third-party-advisoryx_refsource_SECUNIAThird Party Advisory | |
| http://secunia.com/advisories/27377 | third-party-advisoryx_refsource_SECUNIAThird Party Advisory | |
| http://secunia.com/advisories/28318 | third-party-advisoryx_refsource_SECUNIAThird Party Advisory | |
| http://securityreason.com/securityalert/3102 | third-party-advisoryx_refsource_SREASONExploitThird Party Advisory | |
| http://secweb.se/en/advisories/php-mysql-safe-mode-bypass-vulnerability/ | x_refsource_MISCExploitThird Party Advisory | |
| http://www.gentoo.org/security/en/glsa/glsa-200710-02.xml | vendor-advisoryx_refsource_GENTOOThird Party Advisory | |
| http://www.php.net/ChangeLog-4.php | x_refsource_CONFIRMVendor Advisory | |
| http://www.php.net/ChangeLog-5.php#5.2.4 | x_refsource_CONFIRMVendor Advisory | |
| http://www.php.net/releases/4_4_8.php | x_refsource_CONFIRMVendor Advisory | |
| http://www.php.net/releases/5_2_4.php | x_refsource_CONFIRMVendor Advisory | |
| http://www.trustix.org/errata/2007/0026/ | vendor-advisoryx_refsource_TRUSTIXBroken Link | |
| http://www.vupen.com/english/advisories/2007/3023 | vdb-entryx_refsource_VUPENPermissions RequiredThird Party Advisory | |
| http://www.vupen.com/english/advisories/2008/0059 | vdb-entryx_refsource_VUPENPermissions RequiredThird Party Advisory | |
| https://access.redhat.com/security/cve/CVE-2007-3997 | Vendor Advisory | |
| https://bugzilla.redhat.com/show_bug.cgi?id=278001 | Issue Tracking | |
| https://exchange.xforce.ibmcloud.com/vulnerabilities/36384 | vdb-entryx_refsource_XFThird Party AdvisoryVDB Entry | |
| https://exchange.xforce.ibmcloud.com/vulnerabilities/39402 | vdb-entryx_refsource_XFThird Party AdvisoryVDB Entry | |
| https://issues.rpath.com/browse/RPL-1693 | x_refsource_CONFIRMBroken Link | |
| https://issues.rpath.com/browse/RPL-1702 | x_refsource_CONFIRMBroken Link | |
| https://nvd.nist.gov/vuln/detail/CVE-2007-3997 | ||
| https://www.cve.org/CVERecord?id=CVE-2007-3997 | ||
| https://www.exploit-db.com/exploits/4392 | exploitx_refsource_EXPLOIT-DBThird Party AdvisoryVDB Entry |
Change history (0)
No recorded changes yet.