CVE-2021-4034
KEV ransomware PoC ×4massOut-of-Bounds Read/Write Local Privilege Escalation in polkit pkexec (PwnKit)
CISA: Red Hat Polkit Out-of-Bounds Read and Write Vulnerability
CVE-2021-4034 ('PwnKit') is an out-of-bounds read and write (CWE-125/CWE-787) in polkit's setuid-root pkexec utility, which mishandles the calling parameter count and ends up trying to execute environment variables as commands. A local attacker who runs pkexec with crafted environment variables can induce it to execute arbitrary code, gaining administrative (root) rights on the target machine. Because polkit is installed by default on mainstream Linux distributions — including Red Hat Enterprise Linux and its many variants, with the flaw also tracked against Canonical, SUSE, Oracle, Siemens, and StarWind Software products — essentially every standard Linux installation was exposed. The flaw is being actively exploited in the wild: CISA added it to the Known Exploited Vulnerabilities catalog on 2022-06-27 with known ransomware use, and EPSS assigns a 94.9% probability of exploitation (100th percentile). Public proof-of-concept exploits are widely available, making exploitation trivial for any user with local access to an unpatched host.
What to do: Apply the polkit/pkexec updates from each distribution vendor immediately per vendor instructions, as required by the CISA KEV catalog. If patching must be delayed, removing the setuid bit from pkexec (e.g., chmod 0755 /usr/bin/pkexec) is a widely documented interim mitigation, though it may affect functionality that relies on pkexec. Prioritize hosts where untrusted or low-privilege users can log in, and hunt for prior exploitation given known ransomware use.
| polkit project polkit (pkexec utility) | — |
| Red Hat Enterprise Linux Server | — |
| Red Hat Enterprise Linux Desktop | — |
| Red Hat Enterprise Linux | — |
| Red Hat Enterprise Linux EUS | — |
| Red Hat Enterprise Linux Server Update Services for SAP Solutions | — |
| Red Hat Enterprise Linux for IBM Z Systems | — |
| Red Hat Enterprise Linux for IBM Z Systems EUS | — |
| Red Hat Enterprise Linux for Power Big Endian | — |
| Red Hat Enterprise Linux for Power Little Endian | — |
| Red Hat Enterprise Linux for Power Little Endian EUS | — |
| Red Hat Enterprise Linux for Scientific Computing | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
A local privilege escalation vulnerability was found on polkit's pkexec utility. The pkexec application is a setuid tool designed to allow unprivileged users to run commands as privileged users according predefined policies. The current version of pkexec doesn't handle the calling parameters count correctly and ends trying to execute environment variables as commands. An attacker can leverage this by crafting environment variables in such a way it'll induce pkexec to execute arbitrary code. When successfully executed the attack can cause a local privilege escalation given unprivileged users administrative rights on the target machine.
- Affected
- Red Hat Polkit
- Required action
- Apply updates per vendor instructions.
- Due date
- Ransomware use
- Known
- Vendors
- polkit projectredhatcanonicalsuseoraclesiemensstarwindsoftware
- Products
- polkit, enterprise linux server update services for sap solutions, enterprise linux, enterprise linux desktop, enterprise linux eus, enterprise linux for ibm z systems, enterprise linux for ibm z systems eus, enterprise linux for power big endian, enterprise linux for power little endian, enterprise linux for power little endian eus, enterprise linux for scientific computing, enterprise linux server
- Weakness
- CWE-787, CWE-125
- Vector
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H