CVE-2021-4034A local privilege escalation vulnerability was found on polkit's pkexec utility. The pkexec application is a setuid tool designed to allow…
- 7.8HighCVSS base score
- 94.9%Exploitation in 30 daysEPSS · top 0.1% of all CVEs
- YesKnown exploitedin CISA's KEV since 27 Jun 2022
- 2Public exploitsMetasploit, Nuclei and Exploit-DB
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.
Exploited in the wild
CISA lists this vulnerability in its Known Exploited Vulnerabilities catalog as Red Hat Polkit Out-of-Bounds Read and Write Vulnerability.
- Added
- 27 Jun 2022
- Fix due (US federal)
- 18 Jul 2022
- Used by ransomware
- Known
Apply updates per vendor instructions.
ENISA's EU Vulnerability Database lists it as exploited, from CISA's KEV, since 27 Jun 2022.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. The public collections list a Metasploit module and an Exploit-DB entry for it. CISA's SSVC rates its exploitation: it is being exploited.
Show the exploits2
Metasploit modules1 module
- Local Privilege Escalation in polkits pkexec (Metasploit module) (opens in a new tab)
exploit/linux/local/cve_2021_4034_pwnkit_lpe_pkexecRank excellentdisclosed 25 Jan 2022
Exploit-DB1 entry
- PolicyKit-1 0.105-31 - Privilege Escalation (Exploit-DB entry) (opens in a new tab)
EDB-ID 50689local, linuxpublished 27 Jan 2022Not verified
Modules, templates and exploits as listed by the Metasploit Framework (BSD-3-Clause), ProjectDiscovery's Nuclei templates (MIT) and the Exploit Database (GPLv2), read once a day. Where the data comes from
Timeline
ID reserved
By redhat
- 2 months later
· 2 months later
Published
- 5 months later
· 5 months later
Added to CISA KEV
Known exploited, also by ransomware
- 4 years later
· 4 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| CISA-ADPADP (enrichment) | 3.1 | High7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVDNVD · Analyzed | 3.1 | High7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 94.9% · top 0.1% of all CVEs (14 Nov 2026)
- CISA SSVC
- Exploitation: active · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.8.
Affected products
polkit
- affected all
References
References13
- https://access.redhat.com/security/vulnerabilities/RHSB-2022-001 (opens in a new tab)x_transferred
- https://www.qualys.com/2022/01/25/cve-2021-4034/pwnkit.txt (opens in a new tab)x_transferred
- https://bugzilla.redhat.com/show_bug.cgi?id=2025869 (opens in a new tab)x_transferred
- https://gitlab.freedesktop.org/polkit/polkit/-/commit/a2bf5c9c83b6ae46cbd5c779d3055bff81ded683 (opens in a new tab)x_transferred
- https://www.oracle.com/security-alerts/cpuapr2022.html (opens in a new tab)x_transferred
- http://packetstormsecurity.com/files/166196/Polkit-pkexec-Local-Privilege-Escalation.html (opens in a new tab)x_transferred
- http://packetstormsecurity.com/files/166200/Polkit-pkexec-Privilege-Escalation.html (opens in a new tab)x_transferred
- https://www.suse.com/support/kb/doc/?id=000020564 (opens in a new tab)x_transferred
- https://cert-portal.siemens.com/productcert/pdf/ssa-330556.pdf (opens in a new tab)x_transferred
- https://www.starwindsoftware.com/security/sw-20220818-0001/ (opens in a new tab)x_transferred
- https://www.secpod.com/blog/local-privilege-escalation-vulnerability-in-major-linux-distributions-cve-2021-4034/ (opens in a new tab)x_transferred
- https://www.vicarius.io/vsociety/posts/pwnkit-pkexec-lpe-cve-2021-4034 (opens in a new tab)
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-4034 (opens in a new tab)government-resource
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- CISA KEV catalog (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-33934 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-4034)Record last updated .