Privilege escalation in polkit pkexec

Published: 2022-01-26 | Updated: 2023-04-27
Risk Medium
Patch available YES
Number of vulnerabilities 1
CVE-ID CVE-2021-4034
Exploitation vector Local
Public exploit Vulnerability #1 is being exploited in the wild.
Vulnerable software
Other software / Other software solutions


Security Bulletin

This security bulletin contains one medium risk vulnerability.

1) Input validation error

EUVDB-ID: #VU60007

Risk: Medium

CVSSv3.1: 8.4 [CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H/E:H/RL:O/RC:C]

CVE-ID: CVE-2021-4034

CWE-ID: CWE-20 - Improper input validation

Exploit availability: Yes


The vulnerability allows a local user to escalate privileges on the system.

The vulnerability exists due to improper handling of the calling parameters count in the pkexec setuid binary, which causes the binary to execute environment variables as commands. A local user can craft environment variables in a way that they will be processed and executed by pkexec and execute arbitrary commands on the system as root.


Install update from vendor's website.

Vulnerable software versions

polkit: 0.92 - 0.120

External links

Q & A

Can this vulnerability be exploited remotely?

No. This vulnerability can be exploited locally. The attacker should have authentication credentials and successfully authenticate on the system.

Is there known malware, which exploits this vulnerability?

Yes. This vulnerability is being exploited in the wild.