
This contains single-file exploit for cve-2021-4034 which is a Polkit Local Privilege Escalation. Use it wisely!
This contains single-file exploit for cve-2021-4034 which is a Polkit Local Privilege Escalation. Use it wisely!
CVE-2021-4034, commonly referred to as Pwnkit, is a memory corruption vulnerability in the pkexec component of Polkit, a toolkit used for defining and handling authorizations in Unix-like systems. The vulnerability stems from improper handling of environment variables, allowing a local user to execute arbitrary code as the root user.
The core issue lies in how pkexec fails to properly sanitize environment variables before parsing them. This leads to an out-of-bound write condition in certain scenarios, ultimately allowing for local privilege escalation. It has existed in the codebase since the initial commit of pkexec in 2009, making nearly every major Linux distribution vulnerable until patched in early 2022.
sudo apt updatesudo apt install gitgit clone https://github.com/Z3R0-0x30/CVE-2021-4034.gitcd CVE-2021-4034chmod +x Z3R0_polkitLPE.sh./Z3R0_polkitLPE.sh