From: johannesdahse at gmx dot de
Operating system: Windows
PHP version: 5.2.6
PHP Bug Type: Safe Mode/open_basedir
Bug description: safe_mode bypass
Description:
------------
safe_mode bypass with a preceding backslash. tested with exec(), system()
and passthru(). on windows only.
Sorry, I do feel this bug concerns a security issue but I got no response
from [EMAIL PROTECTED] after sending 2 emails from 2 different accounts
about 6 weeks ago.
Reproduce code:
---------------
on commandline:
php -n -d safe_mode=on -r "exec('\ping 192.168.222.1');"
with PHP script and enabled safe_mode in php.ini:
<? exec('\ping 192.168.222.1'); ?>
Expected result:
----------------
safe_mode turned on should block code execution from exec() and other
functions.
Actual result:
--------------
By adding a backslash infront of the command the command got executed
anyhow.
--
Edit bug report at http://bugs.php.net/?id=45997&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=45997&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=45997&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=45997&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45997&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=45997&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45997&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45997&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45997&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45997&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45997&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=45997&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=45997&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45997&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45997&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45997&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45997&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45997&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45997&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45997&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45997&r=mysqlcfg