“PwnKit” security bug gets you root on most Linux distros – what to do

The CVE-2021-4034 in Polkit allows local attackers to gain full root access on most Linux systems via the pkexec utility. […]

Picture of fog71

fog71

Senior Penetration Tester

Table of Contents

The CVE-2021-4034 in Polkit allows local attackers to gain full root access on most Linux systems via the pkexec utility.

Discovery of a Critical Linux Privilege Escalation Bug

Security researchers at Qualys discovered a major vulnerability affecting nearly all Linux distributions through a core system component. Because Polkit is installed by default on most Linux distributions, the vulnerability affects a very wide range of systems.

Introduction to the “PwnKit” Vulnerability

The flaw, tracked as CVE-2021-4034, was named “PwnKit” due to its ability to give attackers full system control. Although remote exploitation is not possible, any local user with system access could potentially escalate privileges.

Polkit: A Core Linux Authorization System

Polkit is used to manage permissions between unprivileged applications and privileged system services. Successful exploitation gives attackers complete control over the system, including files, processes, and user accounts.

Role of pkexec in Privilege Escalation

The vulnerable component, pkexec, acts similarly to sudo, allowing users to execute commands with elevated root privileges when authorized. Linux distributions quickly released patches to fix the vulnerability after its disclosure.

How pkexec Is Normally Used

Under normal conditions, pkexec prompts for authentication and checks system policies before granting temporary administrative access. The flaw highlights how small mistakes in privilege management tools like Polkit can lead to full system compromise.

Where the Vulnerability Exists

The bug lies in how pkexec handles environment variables and command execution when no proper command arguments are provided.

Exploitation Leads to Root Access

Attackers can exploit the flaw locally to bypass authentication checks and gain full root (UID 0) privileges on the system.

Reading progress
0%
Share this article
Facebook
Twitter
LinkedIn
WhatsApp

🔥 Trending This Week

Top 5 Reasons You Lose Control of Your Android Phone (Before You Even Realize It)

Serious Security: OpenSSL fixes “error conflation” bugs – how mixing up mistakes can lead to trouble

Serious Security: Linux full-disk encryption bug fixed – patch now!

Serious Security: How to make sure you don’t miss bug reports!

Scroll to Top