|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-07-07 20:55 UTC] sniper@php.net
[2002-08-09 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 08:00:02 2025 UTC |
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.