Hexret
CVE-2021-4034PwnKithigh 7.8PoC available

polkit pkexec empty-argv environment corruption (PwnKit, CVE-2021-4034)

Run with an empty argument vector, the setuid-root pkexec reads and then writes argv[1], which aliases the environment, reintroducing a stripped variable (GCONV_PATH) to gain local root. Nicknamed PwnKit (a pun on polkit), it sat unnoticed for over twelve years and affects nearly every Linux distribution.

Product
polkit (pkexec)
Vendor
The polkit project (freedesktop.org)
Affected
All polkit versions shipping pkexec, since its introduction in May 2009 (NVD: polkit before 0.120 / fixed in 121). pkexec is present by default on essentially every Linux distribution.
Fixed in
Upstream commit a2bf5c9c (Jan Rybar, 2022-01-25), released as polkit 121, with distribution backports the same week
Weakness
CWE-787
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Published
28 Jan 2022

Practice this CVE, free

Classified as

References

Related CVEs