Red Hat Polkit Out-of-Bounds Read and Write
CVE-2021-4034 is a high-severity out-of-bounds read vulnerability in polkit, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. Affected polkit versions: all. The record does not name a fixed version, so check the vendor advisory. CISA added it to the Known Exploited Vulnerabilities catalogue on June 27, 2022, which means attacks have been observed in the wild, including in ransomware campaigns.
Attackers are already exploiting this vulnerability, according to CISA.
What to do
- Update Sinumerik Edge to 3.3.0 or a later version.
- Update Scalance Lpe9403 Firmware to 2.0 or a later version.
- CISA's required action: Apply updates per vendor instructions.
- Read the advisory on access.redhat.com for workarounds and exact fixed builds.
Affected products and versions
Version data comes from the organisation that assigned the CVE; 5 further products are omitted here. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.8 | High | NVD |
| CVSS 3.1 | 7.8 | High | CISA (ADP) |
| CVSS 2.0 | 7.2 | High | NVD |
Official 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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Out-of-bounds Read
The product reads data past the end, or before the beginning, of the intended buffer.
How developers prevent this class of flaw
- Use a language that provides appropriate memory abstractions.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: active, automatable: no, technical impact: total).
- Added to CISA's Known Exploited Vulnerabilities catalogue.
- Deadline for US federal agencies to remediate, set by CISA.
- Record last changed materially (score, affected products, status or references).
References
Advisories
Patches and release notes
- bugzilla.redhat.com/show_bug.cgi?id=2025869Issue Tracking
- gitlab.freedesktop.org/polkit/polkit/-/commit/a2bf5c9c83b6ae46cbd5c779d3055bff81ded683
- oracle.com/security-alerts/cpuapr2022.htmlThird Party Advisory
- qualys.com/2022/01/25/cve-2021-4034/pwnkit.txtExploit, Mitigation, Third Party Advisory
Third-party and government advisories
- packetstormsecurity.com/files/166200/Polkit-pkexec-Privilege-Escalation.htmlThird Party Advisory, VDB Entry
- cert-portal.siemens.com/productcert/pdf/ssa-330556.pdfThird Party Advisory
- starwindsoftware.com/security/sw-20220818-0001/Third Party Advisory
- suse.com/support/kb/doc/?id=000020564Third Party Advisory
- cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-4034US Government Resource
Technical write-ups (may include proof of concept)
- packetstormsecurity.com/files/166196/Polkit-pkexec-Local-Privilege-Escalation.htmlExploit, Third Party Advisory, VDB Entry
- secpod.com/blog/local-privilege-escalation-vulnerability-in-major-linux-distributions-cve-2021-4034/Exploit, Third Party Advisory
- vicarius.io/vsociety/posts/pwnkit-pkexec-lpe-cve-2021-4034Exploit, Third Party Advisory
Other vulnerabilities in polkit
- 7.8 High severity
Red Hat Polkit Incorrect Authorization Exploited
Recent Out-of-bounds Read vulnerabilities
- 9.1 Critical severity
- 9.1 Critical severity
- 9.1 Critical severity
- 7.1 High severity
- 7.5 High severity
- 7.8 High severity
Spotted an error? Tell us.