What’s Vulnerable › Vulnerabilities
CVE-2021-4034: Red Hat Polkit Out-of-Bounds Read and Write Vulnerability
- Severity: high (CVSS 7.8 v3.1)
- Exploited in the wild: yes — in CISA KEV since 2022-06-27
- EPSS: 94.9% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2022-01-28 · updated 2026-08-15
- Weakness: CWE-787
Description
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 products
- Canonical Ubuntu Linux: 14.04, 16.04, 18.04, 20.04, 21.10
- Oracle Corporation Oracle HTTP Server: 12.2.1.3.0, 12.2.1.4.0
- Oracle Corporation Oracle ZFS Storage Appliance Kit: 8.8
- Polkit Project Polkit: before 121 — fixed in 121
- Red Hat Enterprise Linux: 8.0
- RedHat Enterprise Linux Desktop: 7.0
- RedHat Enterprise Linux Eus: 8.2
- RedHat Enterprise Linux For Ibm Z Systems: 7.0, 8.0
- RedHat Enterprise Linux For Ibm Z Systems Eus: 8.2, 8.4
- RedHat Enterprise Linux For Power Big Endian: 7.0
- RedHat Enterprise Linux For Power Little Endian: 7.0, 8.0
- RedHat Enterprise Linux For Power Little Endian Eus: 8.1, 8.2, 8.4
- RedHat Enterprise Linux For Scientific Computing: 7.0
- RedHat Enterprise Linux Server: 6.0, 7.0
- RedHat Enterprise Linux Server Aus: 7.3, 7.4, 7.6, 7.7, 8.2, 8.4
- RedHat Enterprise Linux Server Eus: 8.4
- RedHat Enterprise Linux Server Tus: 7.6, 7.7, 8.2, 8.4
- RedHat Enterprise Linux Server Update Services For Sap Solutions: 7.6, 7.7, 8.1, 8.2, 8.4
- RedHat Enterprise Linux Workstation: 7.0
- Siemens SCALANCE LPE9403: before 2.0 — fixed in 2.0
- Siemens SINUMERIK Edge: before 3.3.0 — fixed in 3.3.0
- Starwindsoftware Command Center: 1.0-update3_build5871
- Starwindsoftware Starwind Virtual San: v8-build14338
- SUSE Enterprise Storage: 7.0
- SUSE Linux Enterprise Server 15 SP1: 15-sp2
- SUSE Linux Enterprise High Performance Computing: 15.0-sp2
- SUSE Linux Enterprise Server: 15-sp2
- SUSE Linux Enterprise Workstation Extension: 12-sp5
- SUSE Manager Proxy: 4.1
- SUSE Manager Server: 4.1
How to fix
Upgrade to a fixed version: Polkit Project Polkit 121; Siemens SCALANCE LPE9403 2.0; Siemens SINUMERIK Edge 3.3.0. Check the vendor advisory for mitigations.
References
- http://packetstormsecurity.com/files/166196/Polkit-pkexec-Local-Privilege-Escalation.html
- http://packetstormsecurity.com/files/166200/Polkit-pkexec-Privilege-Escalation.html
- https://access.redhat.com/security/vulnerabilities/RHSB-2022-001
- https://bugzilla.redhat.com/show_bug.cgi?id=2025869
- https://cert-portal.siemens.com/productcert/pdf/ssa-330556.pdf
- https://gitlab.freedesktop.org/polkit/polkit/-/commit/a2bf5c9c83b6ae46cbd5c779d3055bff81ded683
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.qualys.com/2022/01/25/cve-2021-4034/pwnkit.txt
- https://www.secpod.com/blog/local-privilege-escalation-vulnerability-in-major-linux-distributions-cve-2021-4034/
- https://www.starwindsoftware.com/security/sw-20220818-0001/
- https://www.suse.com/support/kb/doc/?id=000020564
- http://packetstormsecurity.com/files/166196/Polkit-pkexec-Local-Privilege-Escalation.html
Get alerted when CVE-2021-4034 or the next vulnerability affects your stack