CVE-2021-21703 json
PHP-FPM memory access in root process leading to privilege escalation
published 2021-10-25 5 y ago modified 2026-09-08 2 mo ago also BIT-libphp-2021-21703 , BIT-php-2021-21703 , BIT-php-min-2021-21703 , EUVD-2021-8875
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.4%
- EPSS 1.4% chance of exploitation in 30 days, percentile 73%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- bitnami libphp 7.3.32, 7.4.25, 8.0.12
- bitnami php 7.3.32, 7.4.25, 8.0.12
- bitnami php-min 7.3.32, 7.4.25, 8.0.12
- PHP Group PHP 7.4.25, 8.0.12
- php7.4 Debian 11 7.4.25-1+deb11u1
debian advisories DEBIAN-CVE-2021-21703
- php7.2 Ubuntu 18.04 LTS 7.2.24-0ubuntu0.18.04.10
- php7.4 Ubuntu 20.04 LTS 7.4.3-4ubuntu2.7
- php5 Ubuntu Pro 14.04 LTS 5.5.9+dfsg-1ubuntu4.29+esm15
- php7.0 Ubuntu Pro 16.04 LTS 7.0.33-0ubuntu0.16.04.16+esm2
ubuntu advisories UBUNTU-CVE-2021-21703
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- php RHEL 8 7.4.19-2.module+el8.6.0+13953+0a59ce9f
- libzip RHEL 8 1.6.1-1.module+el8.3.0+6678+b09f589e
- php-gd RHEL 8 7.4.19-2.module+el8.6.0+13953+0a59ce9f
- php-cli RHEL 8 7.4.19-2.module+el8.6.0+13953+0a59ce9f
- php-dba RHEL 8 7.4.19-2.module+el8.6.0+13953+0a59ce9f
- php-dbg RHEL 8 7.4.19-2.module+el8.6.0+13953+0a59ce9f
- php-ffi RHEL 8 7.4.19-2.module+el8.6.0+13953+0a59ce9f
- php-fpm RHEL 8 7.4.19-2.module+el8.6.0+13953+0a59ce9f
red hat advisories RHSA-2022:1935RHSA-2022:5491
- php7 SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLES 15 SP2-BCL +10 more 7.4.33-150200.3.46.2
- php7-test openSUSE Leap 15.3 7.4.33-150200.3.46.2
- php74 SLE Software Development Kit 12 SP5, SLE Module for Web and Scripting 12 7.4.33-1.47.2
- php7 SLES for SAP 15 SP1, SLES for SAP 15, SLES 15-LTSS +8 more 7.2.34-150000.4.103.1
- php8 SLE Module for Web and Scripting 15 SP4, openSUSE Leap 15.4 8.0.24-150400.4.14.1
- php8-fpm SLE Module for Web and Scripting 15 SP4, openSUSE Leap 15.4 8.0.24-150400.4.14.1
- php8-test SLE Module for Web and Scripting 15 SP4, openSUSE Leap 15.4 8.0.24-150400.4.14.1
- php8-embed SLE Module for Web and Scripting 15 SP4, openSUSE Leap 15.4 8.0.24-150400.4.14.1
suse advisories SUSE-SU-2022:4069-1SUSE-SU-2022:4068-1SUSE-SU-2022:4067-1SUSE-SU-2022:3661-1SUSE-SU-2022:0679-1SUSE-SU-2021:3943-1
- php8 openSUSE Tumbleweed 8.0.12-1.1
- php7 openSUSE Tumbleweed 7.4.25-1.1
- php7 openSUSE Leap 15.2 7.4.6-lp152.2.21.1
- php7-test openSUSE Leap 15.2 7.4.6-lp152.2.21.1
- php7 openSUSE Leap 15.3 7.4.6-3.29.1
- php7-test openSUSE Leap 15.3 7.4.6-3.29.1
opensuse advisories openSUSE-SU-2024:11585-1openSUSE-SU-2024:11594-1openSUSE-SU-2021:1570-1openSUSE-SU-2021:3943-1
- php AlmaLinux 8 7.4.19-2.module_el8.6.0+2750+78feabcb
- libzip AlmaLinux 8 1.6.1-1.module_el8.6.0+2750+78feabcb
- php-gd AlmaLinux 8 7.4.19-2.module_el8.6.0+2750+78feabcb
- php-cli AlmaLinux 8 7.4.19-2.module_el8.6.0+2750+78feabcb
- php-dba AlmaLinux 8 7.4.19-2.module_el8.6.0+2750+78feabcb
- php-dbg AlmaLinux 8 7.4.19-2.module_el8.6.0+2750+78feabcb
- php-ffi AlmaLinux 8 7.4.19-2.module_el8.6.0+2750+78feabcb
- php-fpm AlmaLinux 8 7.4.19-2.module_el8.6.0+2750+78feabcb
almalinux advisories ALSA-2022:1935
- php Rocky Linux 8 7.4.19-2.module+el8.6.0+789+2130c178
- libzip Rocky Linux 8 1.6.1-1.module+el8.6.0+789+2130c178
- libzip Rocky Linux 8 1.6.1-1.module+el8.4.0+415+e936cba3
- php-pear Rocky Linux 8 1:1.10.12-1.module+el8.4.0+415+e936cba3
- php-pear Rocky Linux 8 1:1.10.12-1.module+el8.6.0+789+2130c178
- php-pecl-rrd Rocky Linux 8 2.0.1-1.module+el8.4.0+414+2e7afcdd
- php-pecl-zip Rocky Linux 8 1.18.2-1.module+el8.6.0+789+2130c178
- php-pecl-zip Rocky Linux 8 1.18.2-1.module+el8.4.0+415+e936cba3
rocky linux advisories RLSA-2022:1935
- php7 Alpine 3.12 7.3.32-r0
- php7 Alpine 3.15, Alpine 3.14, Alpine 3.13 7.4.25-r0
- php8 Alpine 3.16, Alpine 3.15, Alpine 3.14 +1 more 8.0.12-r0
- php81 Alpine 3.19, Alpine 3.18, Alpine 3.17 +1 more 8.1.0_rc5-r0
alpine advisories ALPINE-CVE-2021-21703
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- php Arch Linux 8.0.12-1
arch linux advisories AVG-2486
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-21703 updated cvss 6.4
php: Local privilege escalation via PHP-FPM
-
Red Hat Enterprise Linux 6 php, php-gd, php-cli, php-dba, php-fpm, php-pdo, +20 more Red Hat Enterprise Linux 7 php, php-gd, php-cli, php-dba, php-fpm, php-pdo, +18 more Red Hat Enterprise Linux 8 php, libzip, php-gd, php-cli, php-dba, php-dbg, +30 moreaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux AppStream (v. 8) php 7.4.19-2.module+el8.6.0+13953+0a59ce9f, libzip 1.6.1-1.module+el8.3.0+6678+b09f589e, php-gd 7.4.19-2.module+el8.6.0+13953+0a59ce9f, php-cli 7.4.19-2.module+el8.6.0+13953+0a59ce9f, php-dba 7.4.19-2.module+el8.6.0+13953+0a59ce9f, php-dbg 7.4.19-2.module+el8.6.0+13953+0a59ce9f, +28 morefixed: vendor fix RHSA-2022:1935
-
Red Hat Software Collections for RHEL Workstation(v. 7) rh-php73-php 7.3.33-1.el7, rh-php73-php-gd 7.3.33-1.el7, rh-php73-php-cli 7.3.33-1.el7, rh-php73-php-dba 7.3.33-1.el7, rh-php73-php-dbg 7.3.33-1.el7, rh-php73-php-fpm 7.3.33-1.el7, +22 more Red Hat Software Collections for RHEL(v. 7) rh-php73-php 7.3.33-1.el7, rh-php73-php-gd 7.3.33-1.el7, rh-php73-php-cli 7.3.33-1.el7, rh-php73-php-dba 7.3.33-1.el7, rh-php73-php-dbg 7.3.33-1.el7, rh-php73-php-fpm 7.3.33-1.el7, +22 morefixed: vendor fix RHSA-2022:5491
-
Red Hat Enterprise Linux 9 php, php-gd, php-cli, php-dba, php-dbg, php-ffi, +18 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
cisa ICSA-26-027-02 updated cvss 7.0
Festo Didactic SE MES PC
-
Festo Didactic SE MES PC shipped_with_Windows_10affected: vendor fix
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
Exploit prediction
1.43% chance of exploitation in the next 30 days, higher than 73% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- bugs.php.net https://bugs.php.net/bug.php?id=81026 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H |
| NVD | 3.1 | 7.0 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 6.9 | AV:L/AC:M/Au:N/C:C/I:C/A:C |
| OSV | 3.1 | 7.0 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | libphp | >=7.3.0, <7.3.32 >=7.4.0, <7.4.25 >=8.0.0, <8.0.12 |
7.3.32 7.4.25 8.0.12 |
| bitnami | php | >=7.3.0, <7.3.32 >=7.4.0, <7.4.25 >=8.0.0, <8.0.12 |
7.3.32 7.4.25 8.0.12 |
| bitnami | php-min | >=7.3.0, <7.3.32 >=7.4.0, <7.4.25 >=8.0.0, <8.0.12 |
7.3.32 7.4.25 8.0.12 |
Affected products
- PHP Group PHP
Classification
- Weakness
- Technology feeds
References
-
bugs.php.net
/bug.php?id=81026
exploit, issue-tracking, patch, vendor-advisory, advisory
-
openwall.com
/lists/oss-security/2021/10/26/7
mailing-list, patch, third-party-advisory, advisory
-
oracle.com
/security-alerts/cpujan2022.html
patch, vendor-advisory, advisory
-
oracle.com
/security-alerts/cpuapr2022.html
patch, vendor-advisory, advisory
-
debian.org
/security/2021/dsa-4992
vendor-advisory, third-party-advisory, advisory
-
debian.org
/security/2021/dsa-4993
vendor-advisory, third-party-advisory, advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/JO5RA6YOBGGGKLIA6F6BQRZDDECF5L3R/
vendor-advisory, web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/PBM3KKB3RY2YPOKNMC4HIH7IH3T3WC74/
vendor-advisory, web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/6PZVLICZUJMXOGWOUWSBAEGIVTF6Y6V3/
vendor-advisory, web
-
security.gentoo.org
/glsa/202209-20
vendor-advisory, third-party-advisory, advisory
-
lists.debian.org
/debian-lts-announce/2021/10/msg00021.html
mailing-list, third-party-advisory, advisory
-
security.netapp.com
/advisory/ntap-20211118-0003/
third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-21703
web
Sources
- CVE List CVE-2021-21703
- NVD CVE-2021-21703
- OSV BIT-libphp-2021-21703
- OSV BIT-php-2021-21703
- OSV BIT-php-min-2021-21703
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.