REDHAT-BUG-617673: Low severity PHP PHP vulnerability
The upstream PHP 5.2.14 and 5.3.3 releases corrected an information disclosure flaw where the varexport() function would disclose data if a fatal error occurred due to recursion, memorylimit, or execution time. The buffer is never cleared and is flushed to the user, regardless of the configured displayerrors setting, because it is considered part of the output. This could lead to a disclosure of possibly sensitive information.
The name CVE-2010-2531 has been assigned to this issue.
An example to test:
% cat test.php #!/usr/bin/php <?php @$obj->p =& $obj; varexport($obj, true); ?> % php test.php PHP Fatal error: Nesting level too deep - recursive dependency? in test.php on line 4 stdClass::setstate(array( 'p' => stdClass::setstate(array( 'p' => stdClass::setstate(array( 'p' => stdClass::setstate(array( % cat test2.php #!/usr/bin/php <?php $a[] =& $a; varexport($a, true); ?> % php test2.php PHP Fatal error: Nesting level too deep - recursive dependency? in test.php on line 4 array ( 0 => array ( 0 => array ( 0 => array ( 0 => array (
The upstream changes prevent any output from displaying, so should only display the "PHP Fatal error".
The upstream fix:
http://svn.php.net/viewvc?view=revision&revision=301143
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 5.2.14 - Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 5.3.3
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-617673?
REDHAT-BUG-617673 is classified as a moderate severity vulnerability due to the risk of information disclosure.
How do I fix REDHAT-BUG-617673?
To fix REDHAT-BUG-617673, upgrade PHP to version 5.2.15 or 5.3.4 or later, where the flaw has been addressed.
What are the risks associated with REDHAT-BUG-617673?
The risks associated with REDHAT-BUG-617673 include potential exposure of sensitive data through the var_export() function during fatal errors.
Which versions of PHP are affected by REDHAT-BUG-617673?
PHP versions 5.2.14 and 5.3.3 are specifically affected by REDHAT-BUG-617673.
Is there a workaround for REDHAT-BUG-617673 if I cannot upgrade?
There is no reliable workaround for REDHAT-BUG-617673, and upgrading is the recommended action to mitigate the vulnerability.