A local privilege escalation vulnerability was recently found in the pkexec utility provided by the Polkit package. The pkexec utility does not correctly handle command-line parameters. This allows unprivileged local users to escalate their privileges by injecting parameters and take control of affected operating systems.
Detected vulnerability
- Vulnerability ID: CVE-2021-4034
- Vulnerability severity: high
- Affected versions: all major Linux distributions
Details
The CVE-2021-4034 vulnerability is a memory corruption vulnerability in the pkexec utility of Polkit. The pkexec utility is a setuid-root program that is installed on every major Linux distribution and allows unprivileged users to run commands as privileged users based on predefined policies. The current version of pkexec does not correctly handle command-line parameters. An attacker can exploit this vulnerability by crafting environment variables to induce pkexec to execute arbitrary code. Successful exploitation of this vulnerability can cause a local privilege escalation and grant unprivileged users administrative permissions on affected operating systems.
Security suggestions
- Anolis OS 7: polkit-0.112-26.an7.1
- Anolis OS 8: polkit-0.115-13.an8_5.1
- Alibaba Cloud Linux 2: polkit-0.112-26.3.al7.1
- Alibaba Cloud Linux 3: polkit-0.115-13.al8.1
- For CentOS operating systems, run the following command to upgrade Polkit to a secure
version:
After Polkit is upgraded, you can run the following command to view the Polkit version and check whether the version is a secure one:yum clean all && yum makecache && yum update polkit -y
rpm -qa polkit
- For Ubuntu operating systems, run the following command to upgrade Polkit to a secure
version:
After Polkit is upgraded, you can run the following command to view the Polkit version and check whether the version is a secure one:sudo apt-get updatesudo apt-get install policykit-1
dpkg -l policykit-1
References
- pwnkit: Local Privilege Escalation in polkit's pkexec (CVE-2021-4034)
- pkexec: local privilege escalation (CVE-2021-4034)
- pwnkit: Local Privilege Escalation in polkit's pkexec (CVE-2021-4034)
If you have requests or feedback, you can submit a ticket to contact Alibaba Cloud.
Announcing party
Alibaba Cloud Computing Co., Ltd.