Rapid7 Vulnerability & Exploit Database

RHSA-2012:1046: php security update

Back to Search

RHSA-2012:1046: php security update



PHP is an HTML-embedded scripting language commonly used with the ApacheHTTP Server.It was discovered that the PHP XSL extension did not restrict the filewriting capability of libxslt. A remote attacker could use this flaw tocreate or overwrite an arbitrary file that is writable by the user runningPHP, if a PHP script processed untrusted eXtensible Style Sheet LanguageTransformations (XSLT) content. (CVE-2012-0057)Note: This update disables file writing by default. A new PHP configurationdirective, "xsl.security_prefs", can be used to enable file writing inXSLT.A flaw was found in the way PHP validated file names in file uploadrequests. A remote attacker could possibly use this flaw to bypass thesanitization of the uploaded file names, and cause a PHP script to storethe uploaded file in an unexpected directory, by using a directorytraversal attack. (CVE-2012-1172)Multiple integer overflow flaws, leading to heap-based buffer overflows,were found in the way the PHP phar extension processed certain fields oftar archive files. A remote attacker could provide a specially-crafted tararchive file that, when processed by a PHP application using the pharextension, could cause the application to crash or, potentially, executearbitrary code with the privileges of the user running PHP. (CVE-2012-2386)A format string flaw was found in the way the PHP phar extension processedcertain PHAR files. A remote attacker could provide a specially-craftedPHAR file, which once processed in a PHP application using the pharextension, could lead to information disclosure and possibly arbitrary codeexecution via a crafted phar:// URI. (CVE-2010-2950)A flaw was found in the DES algorithm implementation in the crypt()password hashing function in PHP. If the password string to be hashedcontained certain characters, the remainder of the string was ignored whencalculating the hash, significantly reducing the password strength.(CVE-2012-2143)Note: With this update, passwords are no longer truncated when performingDES hashing. Therefore, new hashes of the affected passwords will not matchstored hashes generated using vulnerable PHP versions, and will need to beupdated.It was discovered that the fix for CVE-2012-1823, released viaRHSA-2012:0546, did not properly filter all php-cgi command line arguments.A specially-crafted request to a PHP script could cause the PHP interpreterto execute the script in a loop, or output usage information that triggersan Internal Server Error. (CVE-2012-2336)A memory leak flaw was found in the PHP strtotime() function call. A remoteattacker could possibly use this flaw to cause excessive memory consumptionby triggering many strtotime() function calls. (CVE-2012-0789)A NULL pointer dereference flaw was found in the PHP tidy_diagnose()function. A remote attacker could use specially-crafted input to crash anapplication that uses tidy::diagnose. (CVE-2012-0781)It was found that PHP did not check the zend_strndup() function's returnvalue in certain cases. A remote attacker could possibly use this flaw tocrash a PHP application. (CVE-2011-4153)Upstream acknowledges Rubin Xu and Joseph Bonneau as the original reportersof CVE-2012-2143.All php users should upgrade to these updated packages, which containbackported patches to resolve these issues. After installing the updatedpackages, the httpd daemon must be restarted for the update to take effect.


  • redhat-upgrade-php
  • redhat-upgrade-php-bcmath
  • redhat-upgrade-php-cli
  • redhat-upgrade-php-common
  • redhat-upgrade-php-dba
  • redhat-upgrade-php-debuginfo
  • redhat-upgrade-php-devel
  • redhat-upgrade-php-embedded
  • redhat-upgrade-php-enchant
  • redhat-upgrade-php-gd
  • redhat-upgrade-php-imap
  • redhat-upgrade-php-intl
  • redhat-upgrade-php-ldap
  • redhat-upgrade-php-mbstring
  • redhat-upgrade-php-mysql
  • redhat-upgrade-php-odbc
  • redhat-upgrade-php-pdo
  • redhat-upgrade-php-pgsql
  • redhat-upgrade-php-process
  • redhat-upgrade-php-pspell
  • redhat-upgrade-php-recode
  • redhat-upgrade-php-snmp
  • redhat-upgrade-php-soap
  • redhat-upgrade-php-tidy
  • redhat-upgrade-php-xml
  • redhat-upgrade-php-xmlrpc
  • redhat-upgrade-php-zts

With Rapid7 live dashboards, I have a clear view of all the assets on my network, which ones can be exploited, and what I need to do in order to reduce the risk in my environment in real-time. No other tool gives us that kind of value and insight.

– Scott Cheney, Manager of Information Security, Sierra View Medical Center