CVE-2021-21703 | PHP-FPM memory access in root process leading to privilege escalation

Exp

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.

Published: 2021-10-25 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2021-21703 is rated Exploit Available (51.2/100): CVSS High severity, with low exploitation likelihood (EPSS 0.06%). Core evidence: 1 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2021-21703

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2021-21703

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2025-03-17 0.31% 0.06% -0.25%
2 2024-12-17 0.10% 0.31% +0.21%
3 2023-03-07 0.10%

Full EPSS history (12 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2021-21703

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.8 3.1 HIGH
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.1 6.0 [email protected]
7.0 3.1 HIGH
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.0 5.9 [email protected]
6.9 2.0 MEDIUM
AV:L/AC:M/Au:N/C:C/I:C/A:C Click to expand
Access vector (AV:L)
Requires local access to the target system.
Access complexity (AC:M)
Exploitation needs some favorable conditions, but not exceptional ones.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:C)
Complete confidentiality impact.
Integrity impact (I:C)
Complete integrity impact.
Availability impact (A:C)
Complete availability impact.
3.4 10.0 [email protected]

Weakness enumeration for CVE-2021-21703

OS Trackers for CVE-2021-21703

vendor priority summary link
alpine high CVE-2021-21703: 3 source package rows (php7, php8, php81); 6 state rows across 4 repos (3.17-community, 3.18-community, 3.19-community, edge-community); fixed 6, open 0. https://security.alpinelinux.org/vuln/CVE-2021-21703
debian not yet assigned CVE-2021-21703 not yet assigned priority: Debian including 1 source packages (php7.4), 1 status rows across 1 suites (bullseye): resolved 1. https://security-tracker.debian.org/tracker/CVE-2021-21703
gentoo high CVE-2021-21703: 1 GLSA(s) (202209-20), 1 atom(s) (dev-lang/php); latest impact high. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2021-21703
redhat medium https://access.redhat.com/security/cve/CVE-2021-21703
suse medium CVE-2021-21703 severity moderate: SUSE including 791 source package names (8-4.1:apache2-mod_php8-8.0.24-150400.4.14.1, 8-4.1:php8-8.0.24-150400.4.14.1, …), 2054 product×package rows across 49 product lines (Container bci/php, Container bci/php-apache, … (49 product lines)): Fixed 2002, Known Not Affected 52. https://www.suse.com/security/cve/CVE-2021-21703/
ubuntu high CVE-2021-21703 high priority: Ubuntu including 6 source packages (php5, php7.0, php7.2, php7.4, php8.0, php8.1), 49 status rows across 9 suites (bionic, focal, groovy, hirsute, impish, jammy, trusty, upstream, xenial): DNE 36, released 7, needs-triage 5, not-affected 1. https://ubuntu.com/security/CVE-2021-21703

Affected software / configurations for CVE-2021-21703

Vendor Product Version Raw CPE
php php >= 7.3.0, <= 7.3.31 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
php php >= 7.4.0, < 7.4.25 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
php php >= 8.0.0, < 8.0.12 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
debian debian_linux 9.0 cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
debian debian_linux 10.0 cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
debian debian_linux 11.0 cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*
fedoraproject fedora 33 cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*
fedoraproject fedora 34 cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
fedoraproject fedora 35 cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
netapp clustered_data_ontap cpe:2.3:a:netapp:clustered_data_ontap:-:*:*:*:*:*:*:*
oracle communications_diameter_signaling_router >= 8.0.0.0, <= 8.5.0.2 cpe:2.3:a:oracle:communications_diameter_signaling_router:*:*:*:*:*:*:*:*

References for CVE-2021-21703

URL Tags
http://www.openwall.com/lists/oss-security/2021/10/26/7 Mailing List Patch Third Party Advisory
https://bugs.php.net/bug.php?id=81026 Exploit Issue Tracking Patch Vendor Advisory
https://lists.debian.org/debian-lts-announce/2021/10/msg00021.html Mailing List Third Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6PZVLICZUJMXOGWOUWSBAEGIVTF6Y6V3/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JO5RA6YOBGGGKLIA6F6BQRZDDECF5L3R/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PBM3KKB3RY2YPOKNMC4HIH7IH3T3WC74/
https://security.gentoo.org/glsa/202209-20 Third Party Advisory
https://security.netapp.com/advisory/ntap-20211118-0003/ Third Party Advisory
https://www.debian.org/security/2021/dsa-4992 Third Party Advisory
https://www.debian.org/security/2021/dsa-4993 Third Party Advisory
https://www.oracle.com/security-alerts/cpuapr2022.html Patch Vendor Advisory
https://www.oracle.com/security-alerts/cpujan2022.html Patch Vendor Advisory
cvelogic Threat Intelligence