Improper Check for Dropped Privileges in zsh - CVE-2019-20044

 

Improper Check for Dropped Privileges in zsh - CVE-2019-20044

Published: March 19, 2020


Vulnerability identifier: #VU26210
CSH Severity: Low
CVSS v4: 8.5 [CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2019-20044
CWE-ID: CWE-273
Exploitation vector: Local access
Exploit availability: Public exploit is available

Vulnerability details

The vulnerability allows a local user to escalate privileges on the system.

The vulnerability exists due to Zsh fails to overwrite the saved uid, so the original privileges, dropped by the --no-PRIVILEGED option, can be restored by executing MODULE_PATH=/dir/with/module zmodload with a module that calls setuid(). A local user can execute arbitrary commands on the system with elevated privileges.


Affected software

zsh
Gentoo Linux
SUSE CaaS Platform
SUSE Manager Proxy
SUSE Manager Server
SUSE Manager Retail Branch Server
SUSE Enterprise Storage
Red Hat Enterprise Linux Server
Red Hat Enterprise Linux Workstation
CentOS
Red Hat Enterprise Linux Desktop
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux for Power, big endian
Red Hat Enterprise Linux for Scientific Computing
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux Server - TUS
Red Hat Enterprise Linux for Power, little endian - Extended Update Support
Red Hat Enterprise Linux EUS Compute Node
Red Hat Enterprise Linux Server - AUS
Red Hat Enterprise Linux for Power, big endian - Extended Update Support
Red Hat Enterprise Linux for x86_64 - Extended Update Support
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
SUSE OpenStack Cloud
SUSE OpenStack Cloud Crowbar
HPE Helion Openstack
Red Hat Enterprise Linux for x86_64
SUSE Linux Enterprise Debuginfo
SUSE Linux Enterprise Point of Sale
SUSE Linux Enterprise Server
SUSE Linux Enterprise Server for SAP
SUSE Linux Enterprise High Performance Computing
SUSE Linux Enterprise Realtime Extension
SUSE Linux Enterprise Module for Basesystem
SUSE Linux Enterprise Server for SAP Applications
SUSE Linux Enterprise Desktop
Ubuntu
Fedora
zsh (Alpine package)
Red Hat Enterprise Linux Server for x86_64 - Update Services for SAP Solutions
Red Hat Enterprise Linux Server for Power LE - Update Services for SAP Solutions
zsh-static (Ubuntu package)
zsh (Ubuntu package)
zsh-debugsource
zsh-debuginfo
zsh
zsh (Red Hat package)

How to mitigate CVE-2019-20044

Install updates from vendor's website.

zsh - update to 5.8
zsh (Alpine package) - update to 5.8-r0
zsh-static (Ubuntu package) - addressed in versions UA Infra or UA Desktop, 5.4.2-3ubuntu3.2, 5.8-3ubuntu1.1, 5.8-6ubuntu0.1
zsh (Ubuntu package) - addressed in versions UA Infra or UA Desktop, 5.4.2-3ubuntu3.2, 5.8-3ubuntu1.1, 5.8-6ubuntu0.1
zsh-debugsource - addressed in versions 4.3.6-67.9.8.1, 5.0.5-6.19.1, 5.6-3.11.1, 5.6-7.5.1
zsh-debuginfo - addressed in versions 4.3.6-67.9.8.1, 5.0.5-6.19.1, 5.6-3.11.1, 5.6-7.5.1
zsh - addressed in versions 4.3.6-67.9.8.1, 5.0.5-6.19.1, 5.6-3.11.1, 5.6-7.5.1
zsh (Red Hat package) - addressed in versions 5.0.2-34.el7_7.2, 5.5.1-6.el8_0.2, 5.5.1-6.el8_1.2
zsh - addressed in versions 5.7.1-6.fc30, 5.7.1-6.fc31

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins