PHP 5.3.9 contains a vulnerability that could allow an unauthenticated, remote attacker to execute arbitrary code or cause a denial of service (DoS) condition on the affected system.
The vulnerability is due to a regression error in the PHP 5.3.9 update. The update introduced the error with the addition of the max_input_vars directive, which is intended to prevent hash collision attacks. An unauthenticated, remote attacker could exploit the vulnerability by sending malicious requests to the affected PHP-based application. If successful, the attacker could execute arbitrary code or cause a DoS condition on the targeted system
Proof-of-concept code that demonstrates an exploit of this vulnerability is publicly available.
PHP has confirmed this vulnerability and released updated software.
Indicators of Compromise
PHP version 5.3.9 is vulnerable.
The vulnerability is due to an implementation flaw in the code that handles the hashing functionality in the affected software. PHP 5.3.9 implemented a fix to remediate a hash collision DoS condition. The fix implemented the new directive max_input_vars in the PHP configuration file php.ini, and corresponding updates to the function php_register_variable_ex() in the php_variables.c source code file. The new code performs improper boundary checks.
An unauthenticated, remote attacker could exploit the vulnerability by sending HTTP requests that contain a number of variables that exceed the value defined in max_input_vars and that include an array with malicious code to an affected PHP-based application. Processing the input could result in arbitrary code execution in the security context of the web server or cause a DoS condition.
PHP is widely utilized for many web applications and has a large installation base. The regression error that introduces the vulnerability was part of a security update to the affected software. Because the version update was a recommended security update, the vulnerability may exist on a large number of web servers.
Proof-of-concept code is publicly available, increasing the likelihood of attack.
Administrators are advised to apply the appropriate updates.
Administrators may consider using IP-based access control lists (ACLs) to allow only trusted systems to access the affected systems.
Administrators are advised to monitor affected systems.
THIS DOCUMENT IS PROVIDED ON AN "AS IS" BASIS AND DOES NOT IMPLY ANY KIND OF GUARANTEE OR WARRANTY, INCLUDING THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE. YOUR USE OF THE INFORMATION ON THE DOCUMENT OR MATERIALS LINKED FROM
THE DOCUMENT IS AT YOUR OWN RISK. CISCO RESERVES THE RIGHT TO CHANGE OR UPDATE ALERTS AT ANY TIME.
A standalone copy or paraphrase of the text of this document that omits the distribution URL is an uncontrolled copy and may lack important information or contain factual errors. The information in this document is intended for end users of Cisco products
Cisco Multivendor Vulnerability Alerts respond to vulnerabilities identified in third-party vendors' products. These alerts contain information compiled from diverse sources and provide comprehensive technical descriptions, objective analytical assessments, workarounds and practical safeguards, and links to vendor advisories and patches.