|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12268 Security bug in php 4.0.5+
Submitted: 2001-07-19 19:29 UTC Modified: 2001-07-26 21:40 UTC
From: hard dot disk at uol dot com dot br Assigned:
Status: Closed Package: Mail related
PHP Version: 4.0.5 OS: Any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: hard dot disk at uol dot com dot br
New email:
PHP Version: OS:


 [2001-07-19 19:29 UTC] hard dot disk at uol dot com dot br,28541,.shtml:

PHP Mail Function Vulnerability
Posted on 19.7.2001
php mail() function does not do check for escape shell commandes, even if
php is running in safe_mode.
So it's may be possible to bypass the safe_mode restriction and gain shell
Significatives lines of ext/standard/mail.c:
>extra_cmd = (*argv[4])->value.str.val;
>strcat (sendmail_cmd, extra_cmd);
>sendmail = popen(sendmail_cmd, "w");
"test",         "; shell_cmd");


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-19 20:56 UTC]
Fixed a while ago in CVS
 [2021-04-06 10:19 UTC]
Automatic comment on behalf of 
Log: Fixed #12268 (Capturing output via exp_loguser from within PHP / Apache):
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Jun 22 13:01:23 2021 UTC