CVE-2021-4034
Confirmed PUBLISHEDA local privilege escalation vulnerability was found on polkit's pkexec utility. The pkexec application is a setuid tool designed to allow...
Recommended Action
Prioritize remediation. Validate affected assets and apply vendor fixes on an accelerated timeline.
At a Glance
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.
- CVE Published
- Jan 28, 2022
- Exploitation Reported
- Jun 27, 2022
- CVSS
- 7.8 High
- EPSS
- —
Affected Versions
| Vendor | Product | Version | Status |
|---|---|---|---|
| n/a |
polkit
|
all |
Affected |
CVE References
- access.redhat.com/security/vulnerabilities/RHSB-2022-001 access.redhat.com · CVE Record https://access.redhat.com/security/vulnerabilities/RHSB-2022-001
- qualys.com/2022/01/25/cve-2021-4034/pwnkit.txt qualys.com · CVE Record https://www.qualys.com/2022/01/25/cve-2021-4034/pwnkit.txt
- bugzilla.redhat.com/show_bug.cgi bugzilla.redhat.com · CVE Record https://bugzilla.redhat.com/show_bug.cgi?id=2025869
- gitlab.freedesktop.org/polkit/polkit/-/commit/a2bf5c9c83b6ae46cbd5c... gitlab.freedesktop.org · CVE Record https://gitlab.freedesktop.org/polkit/polkit/-/commit/a2bf5c9c83b6ae4...
- oracle.com/security-alerts/cpuapr2022.html oracle.com · CVE Record https://www.oracle.com/security-alerts/cpuapr2022.html
Show 6 more references
- packetstormsecurity.com/files/166196/Polkit-pkexec-Local-Privilege-E... packetstormsecurity.com · CVE Record http://packetstormsecurity.com/files/166196/Polkit-pkexec-Local-Privi...
- packetstormsecurity.com/files/166200/Polkit-pkexec-Privilege-Escalat... packetstormsecurity.com · CVE Record http://packetstormsecurity.com/files/166200/Polkit-pkexec-Privilege-E...
- suse.com/support/kb/doc suse.com · CVE Record https://www.suse.com/support/kb/doc/?id=000020564
- cert-portal.siemens.com/productcert/pdf/ssa-330556.pdf cert-portal.siemens.com · CVE Record https://cert-portal.siemens.com/productcert/pdf/ssa-330556.pdf
- starwindsoftware.com/security/sw-20220818-0001 starwindsoftware.com · CVE Record https://www.starwindsoftware.com/security/sw-20220818-0001/
- secpod.com/blog/local-privilege-escalation-vulnerabilit... secpod.com · CVE Record https://www.secpod.com/blog/local-privilege-escalation-vulnerability-...
Recommended Actions
- Prioritize remediation. Validate affected assets and apply vendor fixes on an accelerated timeline.
- Check enrichment artifacts for scanner coverage and available PoCs before rolling remediation validation.
- Use the Pro API to automate enrichment, telemetry, and workflow delivery for VM, SOC, and CTI pipelines.
Known Exploited Vulnerability Sources
Catalogues that list this CVE as a known exploited vulnerability.
Per-source evidence links for KEV attestations are available through the KEVIntel Pro API.
Learn about Pro API access| Source | Added |
|---|---|
| CISA First | 2022-06-27 00:00 UTC |
Scanner Artifacts
Nuclei and Metasploit references linked to this CVE.
| Scanner | Reference | Detected |
|---|---|---|
| Metasploit | https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/local/cve_2021_4034_pwnkit_lpe_pkexec.rb | Apr 28, 2025 |
Virtual Patch
Compensating WAF rules to help reduce exposure to this CVE. Rule content and deployable vendor exports are available with KEVIntel Enterprise.
KEVIntel does not currently have a virtual patch for this CVE. When available, KEVIntel virtual patches ship as deployable ModSecurity, Cloudflare, and AWS WAF rules.
Enterprise feature. Virtual patch rule content and deployable vendor exports (ModSecurity, Cloudflare, AWS WAF) are available to KEVIntel Enterprise users.
CVSS Scores
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
AV:L/AC:L/Au:N/C:C/I:C/A:C
Exploitation Status
Exploited in the wild
Recorded 2022-06-27 00:00:00 UTC · CISA
Proof of concept available
Recorded 2022-01-25 23:11:30 UTC · GitHub
Weaknesses (CWE)
-
Out-of-bounds Write
Scanner Integrations
| Scanner | Reference | Detected |
|---|---|---|
| Metasploit | https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/local/cve_2021_4034_pwnkit_lpe_pkexec.rb | Apr 28, 2025 |
Potential Proof of Concepts
These PoCs are unverified and could contain malware. Use at your own risk.
github · Created 2024-04-19 04:33:14 UTC · 0 stars
github · Created 2024-02-04 19:00:38 UTC · 2 stars
github · Created 2022-10-10 22:56:09 UTC · 2 stars
polkit priv esc: pkexec out of boundary exploit
github · Created 2022-03-23 11:08:20 UTC · 4 stars
github · Created 2022-02-13 11:37:43 UTC · 3 stars
A simple PWNKIT file to convert you to root
github · Created 2022-02-04 18:31:15 UTC · 8 stars
PoC for PwnKit: Local Privilege Escalation Vulnerability in polkit’s pkexec in Python
github · Created 2022-01-30 03:08:51 UTC · 5 stars
PwnKit PoC for Polkit pkexec CVE-2021-4034
github · Created 2022-01-29 06:54:49 UTC · 8 stars
centos 6.10 rpm for fix polkit CVE-2021-4034; centos 6.10的rpm包,修复CVE-2021-4034 漏洞
github · Created 2022-01-28 18:12:54 UTC · 18 stars
Pwnkit Exploit (CVE-2021-4034), no download capabilty? Copy and paste it!
github · Created 2022-01-28 15:16:44 UTC · 6 stars
pkexec (Polkit) exploit of Privilege Escalation vulnerability CVE-2021-4034
github · Created 2022-01-28 15:13:28 UTC · 97 stars
CVE-2021-4034 Add Root User - Pkexec Local Privilege Escalation
github · Created 2022-01-28 13:04:22 UTC · 5 stars
github · Created 2022-01-28 03:58:34 UTC · 2 stars
CVE-2021-4034 - One line in the terminal for an instant priv esc to boxes that are vulnerable. See usage.
github · Created 2022-01-28 02:54:38 UTC · 79 stars
CVE-2021-4034简单优化,以应对没有安装gcc和make的目标环境
github · Created 2022-01-27 17:43:24 UTC · 25 stars
Pre-compiled builds for CVE-2021-4034
github · Created 2022-01-27 16:28:56 UTC · 2 stars
Linux LPE using polkit-1 written in Rust.
github · Created 2022-01-27 16:15:21 UTC · 2 stars
Exploit PoC for the polkit pkexec (PWNKIT) vulnerability
github · Created 2022-01-27 14:43:57 UTC · 344 stars
Proof of concept for pwnkit vulnerability
github · Created 2022-01-27 09:35:54 UTC · 2 stars
github · Created 2022-01-27 08:28:56 UTC · 1 stars
PoC CVE 2021-4034 PwnKit: Local Privilege Escalation Vulnerability Discovered in polkit’s pkexec
github · Created 2022-01-27 02:27:15 UTC · 4 stars
Local Privilege Escalation in polkit's pkexec (CVE-2021-4034)
github · Created 2022-01-27 01:14:11 UTC · 2 stars
A simple proof-of-concept for CVE-2021-4034 (pkexec local privilege escalation)
github · Created 2022-01-26 20:32:10 UTC · 0 stars
Polkit pkexec CVE-2021-4034 Proof Of Concept and Patching
github · Created 2022-01-26 18:53:47 UTC · 2 stars
Linux system service bug gives root on all major distros, exploit published A vulnerability in the pkexec component of Polkit identified as CVE-2021-4034 PwnKit is present in the default configuration of all major Linux distributions and can be exploited to gain privileges over the compj researchers.
github · Created 2022-01-26 17:53:16 UTC · 165 stars
Python exploit code for CVE-2021-4034 (pwnkit)
github · Created 2022-01-26 16:43:18 UTC · 19 stars
github · Created 2022-01-26 16:18:10 UTC · 4 stars
An exploit for CVE-2021-4034 aka Pwnkit: Local Privilege Escalation in polkit's pkexec
github · Created 2022-01-26 13:45:17 UTC · 0 stars
github · Created 2022-01-26 10:58:23 UTC · 11 stars
CVE-2021-4034 POC and Docker and Analysis write up
github · Created 2022-01-26 07:19:21 UTC · 45 stars
polkit pkexec Local Privilege Vulnerability to Add custom commands
github · Created 2022-01-26 04:58:16 UTC · 11 stars
A Golang implementation of clubby789's implementation of CVE-2021-4034
github · Created 2022-01-26 04:05:50 UTC · 4 stars
github · Created 2022-01-26 03:20:18 UTC · 28 stars
CVE-2021-4034: Local Privilege Escalation in polkit's pkexec proof of concept
github · Created 2022-01-26 01:05:55 UTC · 15 stars
Bash implementation of CVE-2021-4034
github · Created 2022-01-26 00:56:36 UTC · 1078 stars
PoC for PwnKit: Local Privilege Escalation Vulnerability in polkit’s pkexec (CVE-2021-4034)
github · Created 2022-01-26 00:53:19 UTC · 2 stars
github · Created 2022-01-26 00:28:52 UTC · 6 stars
github · Created 2022-01-25 23:11:30 UTC · 72 stars
Local Privilege Escalation in polkit's pkexec
Timeline
Key exploitation, disclosure, scanner coverage, and KEV attestation events for this CVE.
-
15:02 UTC about 1 year ago15:02 UTC · about 1 year ago
Metasploit module available
Exploit module available
-
00:00 UTC about 4 years ago00:00 UTC · about 4 years ago
Added to CISA KEV
Listed in the CISA Known Exploited Vulnerabilities catalog
-
00:00 UTC over 4 years ago00:00 UTC · over 4 years ago
CVE published
Vulnerability disclosed publicly
-
23:11 UTC over 4 years ago23:11 UTC · over 4 years ago
Public PoC available
Public proof-of-concept code published
-
00:00 UTC over 4 years ago00:00 UTC · over 4 years ago
CVE ID reserved
Identifier reserved by the CNA
Automate This Intelligence with the Pro API
Confidence scoring, exploit status, sensor telemetry, PoCs, scanner integrations, mentions, and tags are available programmatically for VM, SOC, and CTI workflows.
Pro API Example
GET /api/v2/pro/kevs/CVE-2021-4034
{
"cve_id": "CVE-2021-4034",
"title": "A local privilege escalation vulnerability was found on polkit\'s pkexec utili...",
"affected_vendor": "freedesktop.org",
"affected_product": "polkit",
"affected_versions": [
{ "vendor": "...", "product": "...", "status": "affected", "display_label": "..." }
],
"confidence": "Confirmed",
"cvss_score": 7.8,
"epss_score": null,
"exploit_status": {
"exploited_in_the_wild": true,
"active_exploitation_observed": false
},
"sensor_telemetry": { "...": "Pro API fields" },
"proof_of_concepts": [ "..." ],
"scanner_integrations": [ "..." ]
}