Advisories · Linux & SSH
CVE-2021-4034
High
CVSS 7.8
Actively exploited
polkit pkexec privilege escalation
Disclosed 2022 · Last reviewed 2 Dec 2026
pkexec accepted an empty argument list and let an unprivileged local user run code as root.
What happened
pkexec read past the end of the argument vector when argc was zero, which could point execution at an attacker-controlled environment variable.
Affected and patched versions
- Affected
- polkit pkexec builds before the January 2022 fix, including the long-lived 0.105 packages.
- Patched
- polkit 0.120 and the distro updates that patched pkexec.
How to check your server
Check
pkexec --version
How to fix and harden
- Run pkexec --version or ask the package manager for the polkit version.
- Install the distro update that names CVE-2021-4034. A version number below 0.120 can still be patched if the changelog says so.
- Remove pkexec only if the host does not need polkit.
Fix
pkexec --version
Sources
Version ranges and fixes follow the vendor advisory. When a distribution backports a fix, trust its security tracker over the upstream version number. New advisories: RSS · JSON