An issue was discovered in PHP 5.x and 7.x, when the configuration uses apache2handler/mod_php or php-fpm with OpCache enabled. With 5.x after 5.6.28 or 7.x after 7.0.13, the issue is resolved in a non-default configuration with the opcache.validate_permission=1 setting. The vulnerability details are as follows. In PHP SAPIs where PHP interpreters share a common parent process, Zend OpCache creates a shared memory object owned by the common parent during initialization. Child PHP processes inherit the SHM descriptor, using it to cache and retrieve compiled script bytecode ("opcode" in PHP jargon). Cache keys vary depending on configuration, but filename is a central key component, and compiled opcode can generally be run if a script's filename is known or can be guessed. Many common shared-hosting configurations change EUID in child processes to enforce privilege separation among hosted users (for example using mod_ruid2 for the Apache HTTP Server, or php-fpm user settings). In these scenarios, the default Zend OpCache behavior defeats script file permissions by sharing a single SHM cache among all child PHP processes. PHP scripts often contain sensitive information: Think of CMS configurations where reading or running another user's script usually means gaining privileges to the CMS database.
CVSS Details
- CVSS 3.1 Base Score: 7.5
- CVSS 3.1 Vector: (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Php | — | Upgrade to PHP version 7.0.13Upgrade to PHP version 5.6.28 | Mar 27, 2017 | Mar 2, 2017 |
| Suse | — | Upgrade php5-xmlrpcUpgrade php7-ctypeUpgrade php5-gettextUpgrade php7-gdUpgrade php7-ftpUpgrade php5-intlUpgrade php5-bcmathUpgrade php7-tokenizerUpgrade php7-develUpgrade php7-ldapUpgrade php7-sysvmsgUpgrade php7-bcmathUpgrade php7Upgrade php5-fastcgiUpgrade apache2-mod_php7Upgrade php5-xslUpgrade php5-pspellUpgrade php5-zipUpgrade php5-mcryptUpgrade php5-imapUpgrade php5-fpmUpgrade php5-shmopUpgrade php7-opensslUpgrade php5-ldapUpgrade php5-fileinfoUpgrade php7-pharUpgrade php5-suhosinUpgrade php5-iconvUpgrade php7-fastcgiUpgrade php5-gdUpgrade php7-pcntlUpgrade php5-exifUpgrade php5-pearUpgrade php5-snmpUpgrade php5Upgrade php5-socketsUpgrade php7-fileinfoUpgrade php7-mbstringUpgrade php7-pear-archive_tarUpgrade php5-gmpUpgrade php7-jsonUpgrade php5-sysvshmUpgrade php5-sysvmsgUpgrade php5-domUpgrade php7-domUpgrade php5-jsonUpgrade php5-pdoUpgrade php7-exifUpgrade php7-pgsqlUpgrade php7-xmlrpcUpgrade php5-xmlreaderUpgrade php5-opensslUpgrade php7-bz2Upgrade php7-sysvsemUpgrade php5-sysvsemUpgrade php5-ctypeUpgrade php5-bz2Upgrade php5-sqliteUpgrade php7-mcryptUpgrade php5-pharUpgrade php7-zlibUpgrade php7-sysvshmUpgrade php7-fpmUpgrade php7-dbaUpgrade php5-ftpUpgrade php5-zlibUpgrade php5-tokenizerUpgrade php7-zipUpgrade php7-pearUpgrade php7-intlUpgrade php7-wddxUpgrade php7-shmopUpgrade php7-gmpUpgrade php7-pspellUpgrade php7-gettextUpgrade php7-enchantUpgrade php5-pgsqlUpgrade php7-pdoUpgrade php7-socketsUpgrade php5-opcacheUpgrade php7-xslUpgrade php5-mysqlUpgrade php5-calendarUpgrade php5-develUpgrade php5-soapUpgrade php5-curlUpgrade php7-imapUpgrade php7-odbcUpgrade php5-dbaUpgrade php7-opcacheUpgrade php5-xmlwriterUpgrade php7-snmpUpgrade php7-curlUpgrade php7-xmlreaderUpgrade php7-iconvUpgrade php5-posixUpgrade php5-pcntlUpgrade php5-enchantUpgrade php7-posixUpgrade php5-odbcUpgrade apache2-mod_php5Upgrade php7-sqliteUpgrade php7-mysqlUpgrade php7-calendarUpgrade php7-soapUpgrade php5-mbstringUpgrade php5-wddxUpgrade php7-xmlwriter | Mar 21, 2017 | Mar 2, 2017 |
| Ubuntu | — | Upgrade php5-fpmUpgrade libapache2-mod-php5Upgrade php5-cliUpgrade php5-cgi | Aug 10, 2017 | Mar 2, 2017 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub