|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48231 create_function() command injection vulnerability
Submitted: 2009-05-11 02:53 UTC Modified: 2009-05-11 09:07 UTC
Avg. Score:3.0 ± 1.4
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: root at 80sec dot com Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: 5.*, 6CVS (2009-05-11) OS: *
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: root at 80sec dot com
New email:
PHP Version: OS:


 [2009-05-11 02:53 UTC] root at 80sec dot com
there is a commond injection in this function,you can EXECUTE your php code directly but not CREATE a lambda-style function.It is very useful when sometimes you can create a function but cann??t call your function.

Reproduce code:
$newfunc = create_function('', '};phpinfo();//');

Expected result:
phpinfo executes runtime,needn't call newfunc.

Actual result:
phpinfo executes runtime,needn't call newfunc.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-11 09:07 UTC]
Yea. Right. And eval() is also very secure when passed unfiltered 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Aug 15 03:05:44 2022 UTC