CVE-2021-4034
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.
What to do
This CVE is being exploited in the wild (CISA Known Exploited Vulnerabilities, added 2022-06-27). If you run an affected version, patch or mitigate now.
Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 22.04 | policykit-1 | Fixed | 0.105-31ubuntu1 | UBUNTU-CVE-2021-4034 |
| Ubuntu 20.04 | policykit-1 | Fixed | 0.105-26ubuntu1.2 | UBUNTU-CVE-2021-4034 |
| Ubuntu 18.04 | policykit-1 | Fixed | 0.105-20ubuntu0.18.04.6 | UBUNTU-CVE-2021-4034 |
| Ubuntu 16.04 | policykit-1 | Fix pending | 0.105-14.1ubuntu0.5+esm1 (Ubuntu Pro) | UBUNTU-CVE-2021-4034 |
| Ubuntu 14.04 | policykit-1 | Fix pending | 0.105-4ubuntu3.14.04.6+esm1 (Ubuntu Pro) | UBUNTU-CVE-2021-4034 |
| Debian 14 | policykit-1 | Fixed | 0.105-31.1 | DEBIAN-CVE-2021-4034 |
| Debian 13 | policykit-1 | Fixed | 0.105-31.1 | DEBIAN-CVE-2021-4034 |
| Debian 12 | policykit-1 | Fixed | 0.105-31.1 | DEBIAN-CVE-2021-4034 |
| Red Hat Enterprise Linux 9 | polkit | Not affected | ||
| Red Hat Enterprise Linux 9 | polkit-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | polkit-docs | Not affected | ||
| Red Hat Enterprise Linux 9 | polkit-libs | Not affected | ||
| Red Hat Enterprise Linux 8 | polkit | Fixed | 0:0.115-13.el8_5.1 | RHSA-2022:0267 |
| Red Hat Enterprise Linux 8 | polkit-devel | Fixed | 0:0.115-13.el8_5.1 | RHSA-2022:0267 |
| Red Hat Enterprise Linux 8 | polkit-docs | Fixed | 0:0.115-13.el8_5.1 | RHSA-2022:0267 |
| Red Hat Enterprise Linux 8 | polkit-libs | Fixed | 0:0.115-13.el8_5.1 | RHSA-2022:0267 |
| Red Hat Enterprise Linux 7 | polkit | Fixed | 0:0.112-26.el7_9.1 | RHSA-2022:0274 |
| Red Hat Enterprise Linux 7 | polkit-devel | Fixed | 0:0.112-26.el7_9.1 | RHSA-2022:0274 |
| Red Hat Enterprise Linux 7 | polkit-docs | Fixed | 0:0.112-26.el7_9.1 | RHSA-2022:0274 |
| Red Hat Enterprise Linux 7 | redhat-virtualization-host | Fixed | 0:4.3.21-20220126.0.el7_9 | RHSA-2022:0443 |
| Red Hat Enterprise Linux 7 | redhat-virtualization-host-image-update | Fixed | 0:4.3.21-20220126.0.el7_9 | RHSA-2022:0443 |
| AlmaLinux 8 | polkit | Fixed | 0.115-13.el8_5.2 | ALSA-2022:0267 |
| AlmaLinux 8 | polkit-devel | Fixed | 0.115-13.el8_5.2 | ALSA-2022:0267 |
| AlmaLinux 8 | polkit-docs | Fixed | 0.115-13.el8_5.2 | ALSA-2022:0267 |
| AlmaLinux 8 | polkit-libs | Fixed | 0.115-13.el8_5.2 | ALSA-2022:0267 |
| Rocky Linux 8 | polkit | Fixed | 0:0.115-13.el8_5.1 | RLSA-2022:0267 |
| Alpine Linux 3.24 | polkit | Fixed | 0.120-r2 | ALPINE-CVE-2021-4034 |
| Alpine Linux 3.23 | polkit | Fixed | 0.120-r2 | ALPINE-CVE-2021-4034 |
| Alpine Linux 3.22 | polkit | Fixed | 0.120-r2 | ALPINE-CVE-2021-4034 |
| Alpine Linux 3.21 | polkit | Fixed | 0.120-r2 | ALPINE-CVE-2021-4034 |
| Alpine Linux 3.20 | polkit | Fixed | 0.120-r2 | ALPINE-CVE-2021-4034 |
| Alpine Linux 3.19 | polkit | Fixed | 0.120-r2 | ALPINE-CVE-2021-4034 |
| Alpine Linux 3.18 | polkit | Fixed | 0.120-r2 | ALPINE-CVE-2021-4034 |
| Alpine Linux 3.17 | polkit | Fixed | 0.120-r2 | ALPINE-CVE-2021-4034 |
| Alpine Linux 3.16 | polkit | Fixed | 0.120-r2 | ALPINE-CVE-2021-4034 |
| Alpine Linux 3.15 | polkit | Fixed | 0.119-r8 | ALPINE-CVE-2021-4034 |
What the vendor says
As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- polkit: affected: all
References
- https://access.redhat.com/security/vulnerabilities/RHSB-2022-001
- https://www.qualys.com/2022/01/25/cve-2021-4034/pwnkit.txt
- https://bugzilla.redhat.com/show_bug.cgi?id=2025869
- https://gitlab.freedesktop.org/polkit/polkit/-/commit/a2bf5c9c83b6ae46cbd5c779d3055bff81ded683
- https://www.oracle.com/security-alerts/cpuapr2022.html
- http://packetstormsecurity.com/files/166196/Polkit-pkexec-Local-Privilege-Escalation.html
- http://packetstormsecurity.com/files/166200/Polkit-pkexec-Privilege-Escalation.html
- https://www.suse.com/support/kb/doc/?id=000020564
- https://cert-portal.siemens.com/productcert/pdf/ssa-330556.pdf
- https://www.starwindsoftware.com/security/sw-20220818-0001/
- https://www.secpod.com/blog/local-privilege-escalation-vulnerability-in-major-linux-distributions-cve-2021-4034/
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.