|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
26 + 6 = ?
Subscribe to this entry?

 [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-2021 The PHP Group
All rights reserved.
Last updated: Sun Sep 19 12:03:36 2021 UTC