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 5.6.28Upgrade to PHP version 7.0.13 | Mar 27, 2017 | Mar 2, 2017 |
| Suse | — | Upgrade php7-xmlreaderUpgrade php7-snmpUpgrade php5-dbaUpgrade php7-socketsUpgrade php5-mbstringUpgrade php5-tokenizerUpgrade php5-ftpUpgrade php7-zipUpgrade php5-enchantUpgrade php7-intlUpgrade php7-xmlwriterUpgrade php5-odbcUpgrade php5-pgsqlUpgrade php7-posixUpgrade php7-curlUpgrade php5-pcntlUpgrade php7-iconvUpgrade php7-sqliteUpgrade php7-calendarUpgrade php5-zlibUpgrade php5-wddxUpgrade php7-xslUpgrade apache2-mod_php5Upgrade php7-pearUpgrade php5-soapUpgrade php7-odbcUpgrade php7-mysqlUpgrade php5-posixUpgrade php7-imapUpgrade php7-opcacheUpgrade php5-xmlwriterUpgrade php7-soapUpgrade php5-curlUpgrade php7-pspellUpgrade php5-calendarUpgrade php7-enchantUpgrade php7-gettextUpgrade php7-pdoUpgrade php7-gmpUpgrade php7-shmopUpgrade php7-wddxUpgrade php5-opcacheUpgrade php5-mysqlUpgrade php5-develUpgrade php7-exifUpgrade php5-pharUpgrade php5-gettextUpgrade php5-fastcgiUpgrade php7-gdUpgrade php5-xslUpgrade php7-domUpgrade php7-ldapUpgrade php5-gmpUpgrade php7-fastcgiUpgrade php5-domUpgrade php5-zipUpgrade php5-xmlreaderUpgrade php5-sysvsemUpgrade php7-tokenizerUpgrade php7-dbaUpgrade php7-xmlrpcUpgrade php5-pdoUpgrade php7-mcryptUpgrade php5-imapUpgrade php5Upgrade php7-pgsqlUpgrade php7-sysvshmUpgrade php5-sysvshmUpgrade php7-jsonUpgrade php7-pharUpgrade php7-bz2Upgrade php5-exifUpgrade php5-shmopUpgrade php5-fileinfoUpgrade php5-jsonUpgrade php5-sysvmsgUpgrade php5-sqliteUpgrade php5-ctypeUpgrade php7-pear-archive_tarUpgrade php5-opensslUpgrade php7-ftpUpgrade php5-intlUpgrade php7Upgrade php7-sysvmsgUpgrade apache2-mod_php7Upgrade php7-fpmUpgrade php5-xmlrpcUpgrade php7-pcntlUpgrade php5-socketsUpgrade php5-pearUpgrade php7-mbstringUpgrade php7-develUpgrade php5-snmpUpgrade php7-bcmathUpgrade php7-zlibUpgrade php5-pspellUpgrade php5-mcryptUpgrade php5-gdUpgrade php5-ldapUpgrade php5-bz2Upgrade php5-iconvUpgrade php7-opensslUpgrade php5-suhosinUpgrade php5-fpmUpgrade php7-fileinfoUpgrade php7-sysvsemUpgrade php7-ctypeUpgrade php5-bcmath | Mar 21, 2017 | Mar 2, 2017 |
| Ubuntu | — | Upgrade php5-fpmUpgrade php5-cgiUpgrade libapache2-mod-php5Upgrade php5-cli | 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