CVE-2014-0185: High severity PHP PHP vulnerability
It was reported that, on some distributions, PHP FPM (a FastCGI Process Manager for PHP) used a UNIX socket with insecure, default permissions. This would allow local users to execute PHP scripts with the privileges of the "apache" user. This is a similar situation to using modphp where users can place scripts in their "~/publichtml/" directory.
Original report: http://www.openwall.com/lists/oss-security/2014/04/29/5
On Red Hat Enterprise Linux 6, when using the Apache HTTP Server with modphp, the use of "~/publichtml/" is disabled by default; however, the default FPM configuration is more open, allowing users to talk directly to FPM and have their PHP scripts executed. (Note that there is currently no fastcgi module for the Apache HTTP Server in Red Hat Enterprise Linux 6, or for any other web server.)
Acknowledgements:
Red Hat would like to thank Christian Hoffmann for reporting this issue.
Other sources
sapi/fpm/fpm/fpmunix.c in the FastCGI Process Manager (FPM) in PHP before 5.4.28 and 5.5.x before 5.5.12 uses 0666 permissions for the UNIX socket, which allows local users to gain privileges via a crafted FastCGI client.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/phpto a version that resolves this vulnerability.Fixed in 5.4.28 - Upgrade
Upgrade
redhat/phpto a version that resolves this vulnerability.Fixed in 5.5.12 - Upgrade
Upgrade
debian/php5to a version that resolves this vulnerability.Fixed in 5.4.4-14+deb7u10Fixed in 5.5.12+dfsg-1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 5.4.28 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 5.5.12
Event History
Frequently Asked Questions
What is the severity of CVE-2014-0185?
The severity of CVE-2014-0185 is classified as a high risk due to the potential for local users to execute scripts with elevated privileges.
How do I fix CVE-2014-0185?
To fix CVE-2014-0185, ensure that the permissions for the UNIX socket used by PHP FPM are set securely.
Which PHP versions are affected by CVE-2014-0185?
CVE-2014-0185 affects PHP versions between 5.3.0 and 5.5.12.
Can CVE-2014-0185 be exploited remotely?
CVE-2014-0185 is a local vulnerability and cannot be exploited remotely.
What types of distributions are impacted by CVE-2014-0185?
CVE-2014-0185 impacts various Linux distributions that use insecure default permissions for the PHP FPM UNIX socket.