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

High 7.8 Published Updated

Local unprivileged users can escalate privileges to root by exploiting memory access flaws in PHP-FPM when the main process runs as root.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2021-21703?

CVE-2021-21703 is a high-severity vulnerability in Debian Debian Linux, published on 25 Oct 2021. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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.

Weakness: CWE-787, CWE-284

Which versions are affected by CVE-2021-21703?

3 open source packages ship an affected version, including libphp, php and php-min. It affects 5 products.

PackageAffectedFixed in
libphp BitnamiFrom 7.3.07.3.32, 7.4.25, 8.0.12
php BitnamiFrom 7.3.07.3.32, 7.4.25, 8.0.12
php-min BitnamiFrom 7.3.07.3.32, 7.4.25, 8.0.12
Linux distribution packages (6)
php72 SUSE:Linux Enterprise Module for Web and Scripting 12All versions7.2.5-1.72.1
php74 SUSE:Linux Enterprise Module for Web and Scripting 12All versions7.4.6-1.27.1
php72 SUSE:Linux Enterprise Software Development Kit 12 SP5All versions7.2.5-1.72.1
php74 SUSE:Linux Enterprise Software Development Kit 12 SP5All versions7.4.6-1.27.1
php7 openSUSE:TumbleweedAll versions7.4.25-1.1
php8 openSUSE:TumbleweedAll versions8.0.12-1.1

Products include Debian Debian Linux, Fedoraproject Fedora, Netapp Clustered Data Ontap, Oracle Communications Diameter Signaling Router, Php Php.

How do I fix CVE-2021-21703?

Upgrade libphp to a fixed version for your release line: 7.3.32, 7.4.25 or 8.0.12.

Is CVE-2021-21703 being exploited?

There is no known exploitation of CVE-2021-21703 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as BIT-libphp-2021-21703, BIT-php-2021-21703, BIT-php-min-2021-21703, CLSA-2022-1645466955, CLSA-2022-1645701000, DEBIAN-CVE-2021-21703 and 13 more.

Is CVE-2021-21703 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free