CVE Vulnerabilities

CVE-2021-21703

Improper Access Control

Published: Oct 25, 2021 | Modified: Nov 21, 2024
CVSS 3.x
7
HIGH
Source:
NVD
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
6.9 MEDIUM
AV:L/AC:M/Au:N/C:C/I:C/A:C
RedHat/V2
RedHat/V3
6.4 MODERATE
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
Ubuntu
HIGH

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

The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.

Affected Software

Name Vendor Start Version End Version
Php Php 7.3.0 (including) 7.3.31 (including)
Php Php 7.4.0 (including) 7.4.25 (excluding)
Php Php 8.0.0 (including) 8.0.12 (excluding)
Php5 Ubuntu trusty *
Php5 Ubuntu trusty/esm *
Php7.0 Ubuntu esm-infra/xenial *
Php7.0 Ubuntu xenial *
Php7.2 Ubuntu bionic *
Php7.4 Ubuntu focal *
Php7.4 Ubuntu hirsute *
Php8.0 Ubuntu impish *
Php8.0 Ubuntu upstream *
Red Hat Enterprise Linux 8 RedHat php:7.4-8060020220120080432.0a326c83 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-php73-php-0:7.3.33-1.el7 *

Extended Description

Access control involves the use of several protection mechanisms such as:

When any mechanism is not applied or otherwise fails, attackers can compromise the security of the product by gaining privileges, reading sensitive information, executing commands, evading detection, etc. There are two distinct behaviors that can introduce access control weaknesses:

Potential Mitigations

  • Compartmentalize the system to have “safe” areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area.
  • Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.

References