Security Advisory

CVE-2021-4034: PwnKit, polkit pkexec Local Root

Last updated:
  • CVE-2021-4034

CVE-2021-4034 (PwnKit) is a local privilege escalation in polkit's setuid-root pkexec before version 121: run with no arguments, it reads and writes past argv and lets any local user execute code as root. NVD scores it 7.8 and it is in CISA KEV with known ransomware use. Siemens SCALANCE M-800, S615 and RUGGEDCOM RM1224 are fixed in V7.2.

Vulnerability summary

CVSS base score

7.8

High severity

EPSS score (FIRST)

94.9%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

Yes

Listed as known exploited

Published

Vulnerability ID: CVE-2021-4034 · Source: NVD

Affected components

ComponentCPEVersion range
polkit (pkexec)cpe:2.3:a:polkit_project:polkit:*:*:*:*:*:*:*:*Before 121 (NVD); vulnerable since pkexec was added in May 2009 (Qualys); fix commit a2bf5c9c is in tag 121
Siemens SCALANCE M-800, MUM-800, S615 and RUGGEDCOM RM1224 LTE(4G)—All versions before V7.2; fixed in V7.2 (Siemens SSA-419740, CISA ICSA-23-075-01)
Siemens SCALANCE LPE9403 (6GK5998-3GS00-2AC2)—All versions before V2.0; fixed in V2.0 (Siemens SSA-330556, CISA ICSA-22-167-16)
Siemens SINUMERIK Edge—All versions before V3.3.0; fixed in V3.3.0 (Siemens SSA-330556)
Debian policykit-1 packagepkg:deb/debian/policykit-1stretch fixed in 0.105-18+deb9u2 (DLA-2899-1); buster 0.105-25+deb10u1 and bullseye 0.105-31+deb11u1 (DSA-5059-1); bookworm and later fixed (Debian security tracker, as of 2026-11-20)
Buildroot package/polkit and Yocto meta-oe polkit recipe—Buildroot: fix commit used from 2022-01-26 (commit 4aecb964; in 2022.02 and 2021.11.1), 2021.02.9 carries a backported patch on 0.116. meta-openembedded: dunfell polkit 0.116 and kirkstone polkit 0.119 carry CVE-2021-4034 patches (as of 2026-11-20)

What does this mean for affected devices?

CVE-2021-4034, called PwnKit by the Qualys researchers who found it, is a memory corruption bug in pkexec, the setuid-root helper that ships with polkit. NVD's description: pkexec "doesn't handle the calling parameters count correctly and ends trying to execute environment variables as commands", which gives an unprivileged local user administrative rights. The record was published on 2022-01-28 (NVD, CVE record).

How does PwnKit work?

The Qualys advisory of 2022-01-25 shows that when pkexec is started with an empty argument list (argc of 0), it reads argv[1] out of bounds, which is really the first environment pointer, and later writes a resolved path back to that slot. That out-of-bounds write lets the attacker re-introduce an "unsecure" variable such as GCONV_PATH, which ld.so normally strips from setuid programs, and load their own shared library as root. Qualys calls it exploitable "instantly, reliably, in an architecture-independent way", even when the polkit daemon is not running, and notes pkexec has been vulnerable since its creation in May 2009. The upstream fix, commit a2bf5c9c by Jan Rybar of Red Hat (polkit commit), makes pkexec and pkcheck exit when argc < 1 and stops writing to argv[n] when it is NULL.

How severe is CVE-2021-4034?

NVD's Primary score is CVSS v3.1 7.8 (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H), the same as CISA's ADP score; the Red Hat CNA record itself carries no CVSS score. v2 is 7.2. NVD lists CWE-125 (out-of-bounds read) and CWE-787 (out-of-bounds write); Red Hat and Siemens use CWE-787. It needs a local account, so on an embedded device it is a second step: any foothold as a non-root user, a compromised service or a container process with pkexec reachable, becomes root.

Which firmware and devices are affected?

NVD's CPE covers polkit before version 121; the fix commit is in tag 121 and not in 0.120. Devices are affected when their Linux image installs pkexec with the setuid bit. Siemens ProductCERT names these products, and CISA republished both advisories:

  • Siemens SSA-330556 (2022-06-14, V1.0; CISA ICSA-22-167-16): SCALANCE LPE9403 before V2.0 and SINUMERIK Edge before V3.3.0.
  • Siemens SSA-419740 (2023-03-14, V1.0; CISA ICSA-23-075-01): RUGGEDCOM RM1224 LTE(4G) EU and NAM, SCALANCE M804PB, M812-1, M816-1, M826-2, M874-2, M874-3, M876-3 and M876-4 variants, MUM853-1, MUM856-1, S615 and S615 EEC, all before V7.2. The same advisory covers BusyBox flaws such as CVE-2021-42373.

Build systems and distributions fixed it early:

  • Buildroot switched polkit to the fix commit on 2022-01-26 (commit 4aecb964), which is in Buildroot 2022.02 and the 2021.11.1 tag; the 2021.02.9 LTS tag keeps polkit 0.116 with a backported patch.
  • Yocto Project: polkit lives in meta-openembedded. The dunfell recipe (polkit 0.116) applies CVE-2021-4034.patch, and kirkstone's polkit 0.119 applies 0001-pkexec-local-privilege-escalation-CVE-2021-4034.patch, as of 2026-11-20.
  • Debian fixed stretch in 0.105-18+deb9u2 (DLA-2899-1), buster in 0.105-25+deb10u1 and bullseye in 0.105-31+deb11u1 (DSA-5059-1); bookworm and later ship fixed packages (Debian security tracker).

How do you fix CVE-2021-4034?

Update to the vendor firmware named above: SCALANCE M-800, S615 and RUGGEDCOM RM1224 to V7.2 or later, SCALANCE LPE9403 to V2.0, SINUMERIK Edge to V3.3.0. For your own images, build polkit 121 or later, or apply commit a2bf5c9c. Where a patch cannot be installed, Qualys and Siemens give the same workaround: remove the setuid bit with chmod 0755 /usr/bin/pkexec, which Siemens notes breaks anything that relies on pkexec to run as root. Siemens also recommends restricting system access to authorized personnel with least privilege. Many embedded images have no need for pkexec at all, so dropping polkit from the image is often simpler. Our SCALANCE and RUGGEDCOM guide lists this CVE with the other KEV entries on those devices, and the Yocto and Buildroot SBOM guide covers how to see which polkit an image contains. Other local root flaws on embedded Linux include Dirty Pipe, CVE-2022-0847, the cgroups release_agent flaw CVE-2022-0492 and glibc's Looney Tunables, CVE-2023-4911.

Is CVE-2021-4034 exploited?

Yes. CISA added it to the KEV catalog on 2022-06-27 with a due date of 2022-07-18 and marks known ransomware campaign use as "Known"; it is still listed as of 2026-11-20 (catalog version 2026.11.18, 1,786 entries). FIRST EPSS gives it 0.94921, the 99.9th percentile, in the 2026-11-19 dataset (CISA KEV, FIRST EPSS).

How to fix this class of issueThis advisory's weakness class is Memory corruption. Our practical guide covers how to detect, fix, verify and disclose it: How to fix memory corruption in embedded firmware.

Evidence

  • NVD (read 2026-11-20): status Analyzed; published 2022-01-28; NVD Primary CVSS v3.1 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, v2 7.2; CISA ADP Secondary 7.8; CWE NVD CWE-125 and CWE-787, Red Hat CWE-787; CPE polkit_project:polkit before 121 plus Red Hat Enterprise Linux CPEs; references Qualys, the polkit fix commit and Siemens SSA-330556. — NVD
  • Qualys advisory (read 2026-11-20; coordinated release 2022-01-25): argc of 0 makes pkexec read argv[1] out of bounds (envp[0]) and write a path back; re-introduces GCONV_PATH to load a library as root; vulnerable since May 2009 (commit c8c3d83); exploitable even without the polkit daemon; workaround chmod 0755 /usr/bin/pkexec. — Qualys
  • polkit commit a2bf5c9c 'pkexec: local privilege escalation (CVE-2021-4034)' (Jan Rybar, 2022-01-25), read 2026-11-20 via the polkit-org GitHub mirror: exit when argc < 1 in pkexec and pkcheck; do not write argv[n] when NULL. Commit is contained in tag 121 and not in 0.120. — polkit
  • Siemens SSA-330556 V1.0 (2022-06-14), read 2026-11-20: SCALANCE LPE9403 < V2.0 and SINUMERIK Edge < V3.3.0 affected; CVSS 7.8, CWE-787; workaround chmod 0755 /usr/bin/pkexec, least privilege. CISA ICSA-22-167-16 (2022-06-16) republishes it. — Siemens ProductCERT
  • Siemens SSA-419740 V1.0 (2023-03-14), read 2026-11-20: RUGGEDCOM RM1224 LTE(4G) EU/NAM, SCALANCE M804PB, M812-1, M816-1, M826-2, M874-2, M874-3, M876-3, M876-4, MUM853-1, MUM856-1, S615, S615 EEC all versions < V7.2, update to V7.2; lists CVE-2021-4034 (7.8, CWE-787) among third-party component CVEs. CISA ICSA-23-075-01 (2023-03-16) republishes it. — Siemens ProductCERT
  • Buildroot commit 4aecb964 'package/polkit: bump to fix CVE-2021-4034' (2022-01-26), read 2026-11-20; contained in tag 2022.02; tag 2021.11.1 uses polkit a2bf5c9c; tag 2021.02.9 has polkit 0.116 with 0004-pkexec-local-privilege-escalation-CVE-2021-4034.patch. meta-openembedded dunfell polkit_0.116.bb SRC_URI includes CVE-2021-4034.patch; kirkstone polkit_0.119.bb includes 0001-pkexec-local-privilege-escalation-CVE-2021-4034.patch. — Buildroot / OpenEmbedded
  • Debian security tracker (read 2026-11-20): policykit-1 stretch 0.105-18+deb9u2 (DLA-2899-1), buster 0.105-25+deb10u1 and bullseye 0.105-31+deb11u1 (DSA-5059-1), unstable 0.105-31.1; bookworm 122-3, trixie 126-2 fixed. — Debian
  • CVE record (checked 2026-11-20): CNA Red Hat, published 2022-01-28, CNA CWE-787 with no CNA CVSS metric; CISA-ADP container present. — CVE.org
  • CISA KEV catalog version 2026.11.18 (1,786 entries), checked 2026-11-20: CVE-2021-4034 Red Hat Polkit, dateAdded 2022-06-27, dueDate 2022-07-18, knownRansomwareCampaignUse Known. — CISA KEV
  • EPSS 0.94921, percentile 0.99863, dataset 2026-11-19, read 2026-11-20. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. Siemens SSA-419740: Multiple Third-Party Component Vulnerabilities in RUGGEDCOM and SCALANCE Products before V7.2
  3. Siemens SSA-330556: PwnKit Vulnerability in SCALANCE LPE9403 and SINUMERIK Edge Products
  4. CISA ICS advisory ICSA-23-075-01: Siemens SCALANCE, RUGGEDCOM Third-Party
  5. CISA ICS advisory ICSA-22-167-16: Siemens SCALANCE LPE9403 and SINUMERIK Edge
  6. Qualys Security Advisory: pwnkit, Local Privilege Escalation in polkit's pkexec
  7. polkit commit a2bf5c9c: pkexec: local privilege escalation (CVE-2021-4034)
  8. Buildroot commit 4aecb964: package/polkit: bump to fix CVE-2021-4034
  9. meta-openembedded (dunfell): polkit_0.116.bb
  10. Debian security tracker: CVE-2021-4034
  11. CVE.org record CVE-2021-4034 (CNA: Red Hat)
  12. CISA KEV
  13. FIRST EPSS

Frequently asked questions

Which Siemens firmware fixes CVE-2021-4034?

V7.2 for SCALANCE M-800, MUM-800, S615 and RUGGEDCOM RM1224 LTE(4G) (SSA-419740); V2.0 for SCALANCE LPE9403 and V3.3.0 for SINUMERIK Edge (SSA-330556). CISA republished both as ICSA-23-075-01 and ICSA-22-167-16.

Can PwnKit be exploited over the network?

Not by itself. It needs code running as a local user on the device. On an industrial router or edge device that usually means it is chained with another flaw or a weak account, after which the attacker gets root.

What is the workaround if firmware cannot be updated?

Qualys and Siemens give the same one: remove the setuid bit with chmod 0755 /usr/bin/pkexec. Siemens notes that anything relying on pkexec to run as root then stops working, and recommends restricting system access to authorized personnel with least privilege.

How do I check a Yocto or Buildroot image?

Look for polkit in the image manifest or SBOM and check the version and patches: polkit 121 or later is fixed; Buildroot 2022.02 and 2021.11.1 use the fix commit, 2021.02.9 carries a patch, and meta-openembedded dunfell and kirkstone recipes apply a CVE-2021-4034 patch. An image without pkexec is not exposed.