CVE-2021-4034
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedA local privilege escalation vulnerability was found on polkit's pkexec utility. The pkexec application is a setuid tool designed to allow unprivileged users to run commands as privileged users according predefined policies. The current version of pkexec doesn't handle the calling parameters count correctly and ends trying to execute environment variables as commands. An attacker can leverage this by crafting environment variables in such a way it'll induce pkexec to execute arbitrary code. When successfully executed the attack can cause a local privilege escalation given unprivileged users administrative rights on the target machine.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceA local privilege escalation vulnerability in polkit's pkexec utility stems from incorrect handling of calling parameters, causing the program to attempt execution of environment variables as commands. An unprivileged attacker can craft malicious environment variables to induce pkexec into executing arbitrary code with elevated privileges.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data= 7.6= 7.7= 8.1= 8.2= 8.4= 8.0= 7.0= 8.2= 7.0= 8.0= 8.2= 8.4= 7.0= 7.0= 8.0CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Local
- Complexity
- Low
- Privileges
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Verify pkexec exists on the systemRun `ls -l /usr/bin/pkexec` to confirm the pkexec binary is presentAffected if The file exists and is located at /usr/bin/pkexec
-
Confirm pkexec has setuid permissionsCheck the output of `ls -l /usr/bin/pkexec` for the setuid bit (the 's' in permissions like -rwsr-xr-x)Affected if The permissions show 'rwsr-xr-x' (with the 's' bit set), indicating pkexec runs with root privileges and could be exploited for privilege escalation
-
Determine the installed polkit versionRun `rpm -q polkit` to retrieve the installed polkit package versionAffected if The version matches one of the affected RHEL versions listed: 7.6, 7.7, 8.0, 8.1, 8.2, 8.4 for the corresponding RHEL variants (Server, Desktop, EUS, for IBM Z Systems, for Power Big Endian, for Power Little Endian)
-
Check pkexec version directly if availableRun `pkexec --version` to see the version number reported by the utility itselfAffected if The reported version matches the affected versions listed for RHEL products
A user is affected if pkexec is present with the setuid bit set and the installed polkit version matches one of the specific RHEL versions listed in the affected products (7.6, 7.7, 8.0, 8.1, 8.2, 8.4 for the respective RHEL variants).
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedApply the relevant security patch for polkit (version 0.120 or later recommended) or update the operating system packages. As a temporary workaround, the setuid bit can be removed from pkexec until the patch is applied.
polkit-0.112-14.el7 or later (RHEL 7.x) | polkit-0.115-11.el8 or later (RHEL 8.x)
- Check the current polkit version installed: rpm -qa | grep polkit
- Update the polkit package to the patched version using: yum update polkit (RHEL 7) or dnf update polkit (RHEL 8)
- After the update completes, verify the installed version matches the patched release: rpm -qa | grep polkit
- Reboot the system to ensure all pkexec processes are using the patched binary, or restart any running services that use polkit
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation2.0 h
- Testing1.0 h
- Review / QA1.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,744.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2021-4034 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sources- bugzilla.redhat.com
- packetstormsecurity.com
- access.redhat.com
- bugzilla.redhat.com
- gitlab.freedesktop.org
- www.oracle.com
- www.qualys.com
- packetstormsecurity.com
- packetstormsecurity.com
- cert-portal.siemens.com
- www.secpod.com
- www.starwindsoftware.com
- www.suse.com
- www.vicarius.io
- www.cisa.gov
- nvd.nist.gov
Practitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2021-4034 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data