CVE-2021-4034: Red Hat Polkit Out-of-Bounds Read and Write Vulnerability
Yes. CVE-2021-4034 has been used in real attacks. CISA added it to its Known Exploited Vulnerabilities catalog on 27 June 2022. It is known to have been used in ransomware campaigns. Public exploit code is available: 1 Metasploit module and 1 Exploit-DB entry. EPSS puts the chance of further exploitation attempts in the next 30 days at 94.9%.
- Exploited in real attacks
- Yes. On CISA's exploited list since 27 June 2022
- Used in ransomware
- Yes, known ransomware use
- Public exploit code
- 1 Metasploit module and 1 Exploit-DB entry
- Chance of exploitation (EPSS)
- 94.9% in the next 30 days, higher than 99.9% of scored vulnerabilities. Scored 5 December 2026
- Severity (CVSS)
- 7.8 High (version 3.1)
- Affects
- Red Hat Polkit
- Type of flaw
- Out-of-bounds write (CWE-787)
- Published
- 28 January 2022
- US federal patch deadline
- 18 July 2022
What it is
The Red Hat polkit pkexec utility contains an out-of-bounds read and write vulnerability that allows for privilege escalation with administrative rights.
A 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.
Description from the CVE record.
Is CVE-2021-4034 being exploited?
Yes. CISA lists a vulnerability as known exploited only when it has reliable evidence of exploitation in real attacks, and it added CVE-2021-4034 on 27 June 2022. CISA also marks it as known to be used in ransomware campaigns.
Public exploit code
These are public references that anyone, including an attacker, can find. Their existence lowers the skill needed to use the flaw.
| Source | Entry | Published |
|---|---|---|
| Metasploit | Local Privilege Escalation in polkits pkexec | |
| Exploit-DB | PolicyKit-1 0.105-31 - 'PwnKit' Local Privilege Escalation (LPE) | 27 January 2022 |
Affected products
- polkit
From the CVE record. Check the vendor advisory for the full list of fixed versions.
What to do
CISA's required action: Apply updates per vendor instructions.
Because this flaw has already been used in attacks, patching is only half the job. If an affected system was reachable while unpatched, check it for signs of compromise before trusting it again.
How to check whether you are exposed
- Find every copy. List each place Red Hat Polkit runs, including test systems and anything set up outside IT.
- Compare versions. Match what you find against the affected versions in the vendor advisory.
- Check reachability. An affected system that faces the internet is urgent; one reachable only from inside still matters once an attacker has a foothold.
- Assume low-skill attackers can use it. A Metasploit module exists, which packages the attack into a standard tool.
HackDrill
Find out whether this is reachable in your systems.
A version number tells you a system is affected. A hacking drill tells you whether an attacker can actually get in through a flaw like this one in Polkit. HackDrill's AI agents attack your product, infrastructure, network and cloud the way modern attackers do, and show you the real, exploitable gaps so you can fix them first.
Other tracked vulnerabilities in Red Hat products
| CVE | What it affects | Status | EPSS | Published |
|---|---|---|---|---|
| CVE-2015-3246 | Red Hat Libuser | Public exploit | 14.4% | 11 August 2015 |
| CVE-2015-5287 | Red Hat Automatic Bug Reporting Tool | Public exploit | 5.0% | 7 December 2015 |
| CVE-2018-14667 | Red Hat JBoss RichFaces Framework | Public exploit | 93.5% | 6 November 2018 |
| CVE-2021-3560 | Red Hat Polkit | Public exploit | 21.8% | 16 February 2022 |
| CVE-2010-0738 | Red Hat JBoss | Ransomware Public exploit | 73.8% | 28 April 2010 |
| CVE-2010-1428 | Red Hat JBoss | Ransomware Public exploit | 52.9% | 28 April 2010 |
Sources
- CVE record for CVE-2021-4034
- NVD entry
- CISA Known Exploited Vulnerabilities catalog, version 2026.12.04
- FIRST EPSS, scores dated 5 December 2026
- access.redhat.com
- www.qualys.com
- bugzilla.redhat.com
- gitlab.freedesktop.org
- www.oracle.com
- packetstormsecurity.com
- packetstormsecurity.com
- www.suse.com
Machine-readable: /api/cve/CVE-2021-4034.json