Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2021-4034 — Proof-of-concept exploit for CVE-2021-4034 (PwnKit), a local privilege escalation vulnerability in Polkit's pkexec utility affecting most Linux distributions. | Kitploit
Tools/GitHubGitHub/cerodah/cve-2021-4034
Privilege EscalationVulnerability AnalysisExploitationPenetration TestingBinary Exploitation
GitHubcerodah/cve-2021-4034

CVE-2021-4034

Proof-of-concept exploit for CVE-2021-4034 (PwnKit), a local privilege escalation vulnerability in Polkit's pkexec utility affecting most Linux distributions.

View Repository
22 years agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2021-4034

Polkit PoC

What is Polkit?

Policy Toolkit (or Polkit) since its release in 2009 allows any attacker without root permissions to easily obtain administrative access over any Linux system with the Polkit package. Unfortunately (or not), it is installed by default in most Linux distributions, which has made this vulnerability widespread.

Fortunately (or not), this vulnerability cannot be exploited remotely, making it a local privilege escalation (LPE) vulnerability.

But what is Polkit?

Polkit is part of most Linux authorization systems. When any action that requires administrative permission is performed, Polkit determines whether you have the necessary permissions to execute the action. It is integrated into systemd (replacement for init). In fact, systemd is known as "sudo of systemd", according to THM.

When interacting with polkit we can use pkexec (the program containing the Pwnkit vulnerability). For example, when we try to run useradd with pkexec in a GUI session, a window appears asking for credentials. In CLI we can get something similar to this:

root@kitploit:~
user@user:~$ pkexec useradd test1
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is needed to run '/usr/sbin/useradd' as the super user
Authenticating as: user,,, (user)
Password:

Remediation

Obviously, Canonical has already released patched versions of this package in the APT package manager. If some distributions have not released patched versions, simply remove the SUID bit from pkexec.

root@kitploit:~
sudo chmod 0777 'which pkexec'
Download Tool