Description
The error_log function in basic_functions.c in PHP before 4.4.4 and 5.x before 5.1.5 allows local users to bypass safe mode and open_basedir restrictions via a "php://" or other scheme in the third argument, which disables safe mode.
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 5.2.6 - 'error_log' Safe_mode Bypass EDB-7171 · local · Nov 20, 2008 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
References
- http://www.php.net/release_5_1_5.php
- 1016377 vdb-entry
- 21050 third-party-advisory
- php-errorlog-safe-mode-bypass(27414) vdb-entry
- 1129 third-party-advisory
- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.543.2.51.2.9&r2=1.543.2.51.2.10&pathrev=PHP_4_4&diff_format=u
- 21546 third-party-advisory
- ADV-2006-2523 vdb-entry
- USN-320-1 vendor-advisory
- MDKSA-2006:122 vendor-advisory
- 21125 third-party-advisory
- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?diff_format=u&view=log&pathrev=PHP_4_4
- 20818 third-party-advisory
- 26827 vdb-entry
- 18645 vdb-entry
- 20060625 error_log() Safe Mode Bypass PHP 5.1.4 and 4.4.2 third-party-advisory