#15818 [Fbk->NoF]: escapeshellarg does not escape characters for win32

From: Date: Fri, 09 Aug 2002 05:00:12 +0000
Subject: #15818 [Fbk->NoF]: escapeshellarg does not escape characters for win32
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-16352@lists.php.net to get a copy of this message
 ID:               15818
 Updated by:       php-bugs@lists.php.net
 Reported By:      ghopper@cox.net
-Status:           Feedback
+Status:           No Feedback
 Bug Type:         Program Execution
 Operating System: Win2k
 PHP Version:      4.1.1
 New Comment:

No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


Previous Comments:
------------------------------------------------------------------------

[2002-07-07 20:55:26] sniper@php.net

Thank you for taking the time to report a problem with PHP.
Unfortunately your are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.



------------------------------------------------------------------------

[2002-03-01 12:46:19] ghopper@cox.net

Windows NT 5.0 build 2195
Microsoft-IIS/5.0
php version 4.1.1 (the binary zip package for win32)
php is running cgi-mode (php.exe)

example script:

$arg = "junk && start cmd junk";
$arg = escapeshellarg($arg);
system("anycommand $arg",$output);

This starts a command shell running as the web server process.  This
could be used as an exploit if the contents of $arg come from a form.

This also works with system(escapeshellcmd("anycommand $arg"));

As a suggestion, you might want to create a command to
"removeshellchars" instead of just quoting them.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=15818&edit=1



Thread (3 messages)

« previous php.bugs (#16352) next »