CVE-2021-21703
JSON

7.8high

PHP-FPM memory access in root process leading to privilege escalation

Severity
7.8high CVSS:3.1 by php
Exploit likelihood
1.43% (higher than 73% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
php
Also known as
BIT-LIBPHP-2021-21703BIT-PHP-2021-21703BIT-PHP-MIN-2021-21703

Description

In PHP versions 7.3.x up to and including 7.3.31, 7.4.x below 7.4.25 and 8.0.x below 8.0.12, when running PHP FPM SAPI with main FPM daemon process running as root and child worker processes running as lower-privileged users, it is possible for the child processes to access memory shared with the main process and write to it, modifying it in a way that would cause the root process to conduct invalid memory reads and writes, which can be used to escalate privileges from local unprivileged user to the root user.

Affected

Product or packageVersionsReported by
PHP Group PHPfrom 7.3.x up to 7.3.31, from 7.4.x before 7.4.25, from 8.0.X before 8.0.12CVE List
php phpfrom 7.3.0 up to 7.3.31, from 7.4.0 before 7.4.25, from 8.0.0 before 8.0.12NVD
debian debian_linux9.0, 10.0, 11.0NVD
fedoraproject fedora33, 34, 35NVD
netapp clustered_data_ontapNot specifiedNVD
oracle communications_diameter_signaling_routerfrom 8.0.0.0 up to 8.5.0.2NVD
libphp (Bitnami)from 7.3.0 before 7.3.32, from 7.4.0 before 7.4.25, from 8.0.0 before 8.0.12Bitnami Vulnerability Database
php (Bitnami)from 7.3.0 before 7.3.32, from 7.4.0 before 7.4.25, from 8.0.0 before 8.0.12Bitnami Vulnerability Database
php-min (Bitnami)from 7.3.0 before 7.3.32, from 7.4.0 before 7.4.25, from 8.0.0 before 8.0.12Bitnami Vulnerability Database

All scores

php7.8high CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
NVD7.0high CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD6.9medium CVSS:2.0AV:L/AC:M/Au:N/C:C/I:C/A:C
Bitnami Vulnerability Databasehigh rating

Classification

What each source says

CVE List

In PHP versions 7.3.x up to and including 7.3.31, 7.4.x below 7.4.25 and 8.0.x below 8.0.12, when running PHP FPM SAPI with main FPM daemon process running as root and child worker processes running as lower-privileged users, it is possible for the child processes to access memory shared with the main process and write to it, modifying it in a way that would cause the root process to conduct invalid memory reads and writes, which can be used to escalate privileges from local unprivileged user to the root user.

NVD (es)

En PHP versiones 7.3.x hasta 7.3.31 incluyéndola, versiones 7.4.x y por debajo de 7.4.25 y versiones 8.0.x por debajo de 8.0. 12, cuando es ejecutado PHP FPM SAPI con el proceso demonio FPM principal ejecutado como root y los procesos worker hijos ejecutados como usuarios menos privilegiados, es posible que los procesos hijos accedan a la memoria compartida con el proceso principal y escriban en ella, modificándola de forma que causaría que el proceso root realizara lecturas y escrituras de memoria no válidas, que puede ser usado para escalar los privilegios del usuario local sin privilegios al usuario root

References

https://bugs.php.net/bug.php?id=81026advisory, exploit, issue-tracking, patch, vendor-advisory
https://www.debian.org/security/2021/dsa-4992advisory, third-party-advisory, vendor-advisory
https://www.debian.org/security/2021/dsa-4993advisory, third-party-advisory, vendor-advisory
http://www.openwall.com/lists/oss-security/2021/10/26/7advisory, mailing-list, patch, third-party-advisory
https://lists.debian.org/debian-lts-announce/2021/10/msg00021.htmladvisory, mailing-list, third-party-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JO5RA6YOBGGGKLIA6F6BQRZDDECF5L3R/vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PBM3KKB3RY2YPOKNMC4HIH7IH3T3WC74/vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6PZVLICZUJMXOGWOUWSBAEGIVTF6Y6V3/vendor-advisory, web
https://www.oracle.com/security-alerts/cpujan2022.htmladvisory, patch, vendor-advisory
https://security.netapp.com/advisory/ntap-20211118-0003/advisory, third-party-advisory
https://www.oracle.com/security-alerts/cpuapr2022.htmladvisory, patch, vendor-advisory
https://security.gentoo.org/glsa/202209-20advisory, third-party-advisory, vendor-advisory

Sources

SourceRecordLicence
CVE ListCVE-2021-21703 changed 2024-09-17CVE Terms of Use
NVDCVE-2021-21703 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-LIBPHP-2021-21703 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-PHP-2021-21703 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-PHP-MIN-2021-21703 changed 2026-09-08Apache-2.0