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.
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.
Exploit-DB 1
- PHP 4.4.7/5.2.3 - MySQL/MySQLi 'Safe_Mode' Bypass EDB-4392 · local · Sep 10, 2007 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
References
- php-localinfile-mysql-security-bypass(39402) vdb-entry
- 26822 third-party-advisory
- ADV-2008-0059 vdb-entry
- GLSA-200710-02 vendor-advisory
- http://www.php.net/releases/4_4_8.php
- http://www.php.net/ChangeLog-5.php#5.2.4
- 2007-0026 vendor-advisory
- https://issues.rpath.com/browse/RPL-1693
- 3102 third-party-advisory
- http://secweb.se/en/advisories/php-mysql-safe-mode-bypass-vulnerability/
- https://issues.rpath.com/browse/RPL-1702
- 26838 third-party-advisory
- php-local-infile-security-bypass(36384) vdb-entry
- 27377 third-party-advisory
- 4392 exploit
- http://www.php.net/ChangeLog-4.php
- 27102 third-party-advisory
- ADV-2007-3023 vdb-entry
- http://www.php.net/releases/5_2_4.php
- 28318 third-party-advisory
- 26642 third-party-advisory