Description
PHP 4.0.5 through 4.1.0 in safe mode does not properly cleanse the 5th parameter to the mail() function, which allows local users and possibly remote attackers to execute arbitrary commands via shell metacharacters.
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.x - SafeMode Arbitrary File Execution EDB-20985 · local · Jun 30, 2001 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
References
- RHSA-2003:159 vendor-advisory
- RHSA-2002:129 vendor-advisory
- php-safemode-elevate-privileges(6787) vdb-entry
- 2954 vdb-entry
- 20010630 php breaks safe mode mailing-list
- RHSA-2002:102 vendor-advisory
- http://www.php.net/do_download.php?download_file=php-4.1.2.tar.gz