Skip to content
VulniPulse
High Exploited CISA KEV 2 vendors · 2 advisories

CVE-2021-4034: Red Hat Polkit Out-of-Bounds Read and Write Vulnerability

CVE-2021-4034 key facts

CISA KEV
Listed ; federal due date ; ransomware use known to CISA
Highest advisory rating
High
CVSS base score
7.8 (Red Hat)
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H · base score 7.8, scored by CISA-ADPAttack vector: local. Attack complexity: low. Privileges required: low. User interaction: none. Scope: unchanged. Confidentiality impact: high. Integrity impact: high. Availability impact: high.
Weakness
  • CWE-787 (CWE-787|CWE-125)
EPSS
94.9% chance of exploitation in the next 30 days (99th percentile). FIRST EPSS, .
CISA SSVC
Exploitation: active. Automatable: no. Technical impact: total. CISA, .
Fixed releases
  • Red Hat: polkit-0:0.96-11.el6_10.2, polkit-0:0.112-26.el7_9.1, polkit-0:0.112-12.el7_3.1, polkit-0:0.112-12.el7_4.2, polkit-0:0.112-18.el7_6.3, polkit-0:0.112-22.el7_7.2 and 18 more in the advisory
Vendor advisories
2 from Commvault, Red Hat
Assigned by
redhat (CNA)
CVE record published
Listed by VulniPulse
Record changed

Ratings, versions and fixes are quoted from the vendor advisories that cover only CVE-2021-4034; each belongs to its advisory, not to every product listed. How records are collected and checked.

Is CVE-2021-4034 exploited?

Yes. CISA lists CVE-2021-4034 in its Known Exploited Vulnerabilities catalog (added ), which means CISA has evidence of exploitation in the wild. CISA also reports known use in ransomware campaigns.

CISA required action: Apply updates per vendor instructions.

Am I affected by CVE-2021-4034?

The source names the versions below but does not confirm which products they belong to. Check the Commvault advisory before you decide.

Versions namedFixed in
Commvault: The vulnerability may affect the Commvault Hyperscale products.No fixed version listed by the vendor yet

Description

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.

Text from the CVE.org record (redhat).

How do I fix CVE-2021-4034?

Upgrade to a fixed release named by the vendor:

  • Red Hat: polkit-0:0.96-11.el6_10.2, polkit-0:0.112-26.el7_9.1, polkit-0:0.112-12.el7_3.1, polkit-0:0.112-12.el7_4.2, polkit-0:0.112-18.el7_6.3, polkit-0:0.112-22.el7_7.2
  • For customers who cannot update immediately and doesn't have Secure Boot feature enabled, the issue can be mitigated by executing the following steps: 1) Install required systemtap packages and dependencies as per - pointed by 2) Install polkit debug info: ~~~ debuginfo-install polkit ~~~ 3) Create the following systemtap script, and name it pkexec-block.stp: ~~~ probe process("/usr/bin/pkexec").function("main") { if (cmdline_arg(1) == "") raise(9); } ~~~ 4) Load the systemtap module into the running kernel: ~~~ stap -g -F -m stap_pkexec_block pkexec_block.stp ~~~ 5) Ensure the module is loaded: ~~~ lsmod | grep -i stap_pkexec_block stap_pkexec_block 434176 0 ~~~ 6) Once polkit package was updated to the version containing the fix, the systemtap generated kernel module can be removed by running: ~~~ rmmod stap_pkexec_block ~~~ This mitigation doesn't work for Secure Boot enabled system as SystemTap would require an external compiling server to be able to sign the generated kernel module with a key enrolled into the Kernel's keyring. (Red Hat)

Vendor advisories for CVE-2021-4034

Commvault

1 advisory

Red Hat

1 advisory
  • Advisory severityHigh7.8

    High [CVE-2021-4034] local privilege escalation vulnerability was found on polkit's pkexec utility

    CVE-2021-4034Source published Source updated

    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. Red Hat severity: Important — CVSS 7.8 (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H). Weakness: CWE-787.

    Affected products in this advisory
    • Red Hat Enterprise Linux 6 Extended Lifecycle Support
    • Red Hat Enterprise Linux 7.3 Advanced Update Support
    • Red Hat Enterprise Linux 7.4 Advanced Update Support
    • Red Hat Enterprise Linux 7.6 Advanced Update Support

    11 more entries in the full advisory.

    Source-reported affected versions
    Affected-version details not available in this record.
    Source-reported fixed versions
    • polkit-0:0.96-11.el6_10.2
    • polkit-0:0.112-26.el7_9.1
    • polkit-0:0.112-12.el7_3.1
    • polkit-0:0.112-12.el7_4.2

    20 more entries in the full advisory.

    Mitigation guidance
    • For customers who cannot update immediately and doesn't have Secure Boot feature enabled, the issue can be mitigated by executing the following steps: 1) Install required systemtap packages and dependencies as per - pointed by https://access.redhat.com/solutions/5441 2) Install polkit debug info: ~~~ debuginfo-install polkit ~~~ 3) Create the following systemtap script, and name it pkexec-block.stp: ~~~ probe process("/usr/bin/pkexec").function("main") { if (cmdline_arg(1) == "") raise(9); } ~~~ 4) Load the systemtap module into the running kernel: ~~~ stap -g -F -m stap_pkexec_block pkexec_block.stp ~~~ 5) Ensure the module is loaded: ~~~ lsmod | grep -i stap_pkexec_block stap_pkexec_block 434176 0 ~~~ 6) Once polkit package was updated to the version containing the fix, the systemtap generated kernel module can be removed by running: ~~~ rmmod stap_pkexec_block ~~~ This mitigation doesn't work for Secure Boot enabled system as SystemTap would require an external compiling server to be able to sign the generated kernel module with a key enrolled into the Kernel's keyring.

References

Timeline

  1. CVE record published
  2. Added to CISA KEV
  3. First vendor advisory listed by VulniPulse
  4. CVE record last updated

All Commvault advisories

Get an email when Commvault publishes the next one.

See Commvault's last 90 days first. Live alerts for one product are free for life; every vendor is US$10 a month with Pro (first month US$5).

Alert me about Commvault