CVE-2011-3379: Code Injection
It was reported [1],[2] that due to changes in the isa() function [3],[4] PHP 5.3.7 and 5.3.8 became vulnerable to remote arbitrary code execution when isa() is used in certain ways. Due to the autoload() implementation, if a user were able to upload a crafted file, it could be possible to pass the contents of the file as an argument to the autoload() function which could in turn use that argument as a file to include(). If there was no adequate checking or enforcement of the file to load being, local, this could lead to including a remote script from a remote web site.
An example of a vulnerable autoload() function could be:
function autoload($classname) { include $classname . '.php'; }
In the above example, were $classname to include a remote URL, and if allowurlfopen was enabled in php.ini, this could result in loading a remote PHP script on the server.
This flaw does not affect PHP versions prior to 5.3.7 were this change was introduced. A fix is in PHP's subversion repository (r317183) [5].
[1] http://www.byte.nl/blog/2011/09/23/security-bug-in-isa-function-in-php-5-3-7-5-3-8/ [2] https://bugs.php.net/bug.php?id=55475 [3] https://bugs.php.net/bug.php?id=53727 [4] http://svn.php.net/viewvc/?view=revision&revision=312904 [5] http://svn.php.net/viewvc/?view=revision&revision=317183
Statement:
Not vulnerable. This issue did not affect the versions of php as shipped with Red Hat Enterprise Linux 4, 5, or 6.
Other sources
The isa function in PHP 5.3.7 and 5.3.8 triggers a call to the autoload function, which makes it easier for remote attackers to execute arbitrary code by providing a crafted URL and leveraging potentially unsafe behavior in certain PEAR packages and custom autoloaders.
— MITRE
Affected Software
Remediation
Patch Available
Patch Available
Event History
Frequently Asked Questions
What is the severity of CVE-2011-3379?
CVE-2011-3379 is classified as a critical vulnerability as it allows remote arbitrary code execution.
How do I fix CVE-2011-3379?
To mitigate CVE-2011-3379, upgrade PHP to version 5.3.9 or later.
What versions of PHP are affected by CVE-2011-3379?
CVE-2011-3379 affects PHP versions 5.3.7 and 5.3.8.
Can CVE-2011-3379 be exploited remotely?
Yes, CVE-2011-3379 can be exploited remotely if a crafted file is uploaded to the server.
What underlying issue causes CVE-2011-3379?
CVE-2011-3379 is caused by the changes made in the is_a() function and the implementation of __autoload() in PHP.