Description
In Zsh before 5.8, attackers able to execute commands can regain privileges dropped by the --no-PRIVILEGED option. Zsh fails to overwrite the saved uid, so the original privileges can be restored by executing MODULE_PATH=/dir/with/module zmodload with a module that calls setuid().
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | zsh | 5.8-1 | — |
| Debian 13 | zsh | 5.8-1 | — |
| Debian 12 | zsh | 5.8-1 | — |
| Debian 9 | zsh | 5.3.1-4+deb9u1 | DLA-2470-1 |
| Debian 8 | zsh | 5.0.7-5+deb8u1 | DLA-2117-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | zsh | No fix yet | — |
| Ubuntu 20.04 LTS | zsh | 5.8-3ubuntu1.1 | USN-5325-1 |
| Ubuntu 18.04 LTS | zsh | 5.4.2-3ubuntu3.2 | USN-5325-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 16.04 LTS | zsh | 5.1.1-1ubuntu2.3+esm1 | USN-5325-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 8 | zsh +1 | 5.5.1-6.el8_1.2 | RHSA-2020:0903 |
| RHEL 7 | zsh +1 | 5.0.2-34.el7_7.2 | RHSA-2020:0853 |
| RHEL 6 | zsh +1 | 4.3.11-11.el6_10 | RHSA-2020:0892 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 8.0 E4S | zsh +1 | 5.5.1-6.el8_0.2 | RHSA-2020:0978 |
AlmaLinux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux 8 | zsh-html | 5.5.1-6.el8_1.2 | ALSA-2020:0903 |
Rocky Linux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Rocky Linux 8 | zsh | 5.5.1-6.el8_1.2 | RLSA-2020:0903 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP3 | zsh | 5.6-7.5.1 | SUSE-SU-2022:0735-1 |
| SLES 15 SP2 | zsh | 5.6-7.5.1 | SUSE-SU-2022:0735-1 |
| SLES 15 SP1 | zsh | 5.6-7.5.1 | SUSE-SU-2022:0735-1 |
| SLES 15 | zsh | 5.6-3.11.1 | SUSE-SU-2022:0732-1 |
| SLES 12 SP5 | zsh | 5.0.5-6.19.1 | SUSE-SU-2022:0733-1 |
Show 25 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 12 SP4 | zsh | 5.0.5-6.19.1 | SUSE-SU-2022:0733-1 |
| SLES 12 SP3 | zsh | 5.0.5-6.19.1 | SUSE-SU-2022:0733-1 |
| SLES 12 SP2 | zsh | 5.0.5-6.19.1 | SUSE-SU-2022:0733-1 |
| SLES 11 SP4 | zsh | 4.3.6-67.9.8.1 | SUSE-SU-2022:14910-1 |
| SLES for SAP 15 SP2 | zsh | 5.6-7.5.1 | SUSE-SU-2022:0735-1 |
| SLES for SAP 15 SP1 | zsh | 5.6-7.5.1 | SUSE-SU-2022:0735-1 |
| SLES for SAP 15 | zsh | 5.6-3.11.1 | SUSE-SU-2022:0732-1 |
| SLES for SAP 12 SP5 | zsh | 5.0.5-6.19.1 | SUSE-SU-2022:0733-1 |
| SLES for SAP 12 SP4 | zsh | 5.0.5-6.19.1 | SUSE-SU-2022:0733-1 |
| SLES for SAP 12 SP3 | zsh | 5.0.5-6.19.1 | SUSE-SU-2022:0733-1 |
| SLE Real Time 15 SP2 | zsh | 5.6-7.5.1 | SUSE-SU-2022:0735-1 |
| SLE HPC 15 SP2 | zsh | 5.6-7.5.1 | SUSE-SU-2022:0735-1 |
| SLE HPC 15 SP1 | zsh | 5.6-7.5.1 | SUSE-SU-2022:0735-1 |
| SLE HPC 15 | zsh | 5.6-3.11.1 | SUSE-SU-2022:0732-1 |
| SUSE OpenStack Cloud Crowbar 9 | zsh | 5.0.5-6.19.1 | SUSE-SU-2022:0733-1 |
| SUSE OpenStack Cloud Crowbar 8 | zsh | 5.0.5-6.19.1 | SUSE-SU-2022:0733-1 |
| SUSE OpenStack Cloud 9 | zsh | 5.0.5-6.19.1 | SUSE-SU-2022:0733-1 |
| SUSE OpenStack Cloud 8 | zsh | 5.0.5-6.19.1 | SUSE-SU-2022:0733-1 |
| SUSE Manager Server 4.1 | zsh | 5.6-7.5.1 | SUSE-SU-2022:0735-1 |
| SUSE Manager Retail Branch Server 4.1 | zsh | 5.6-7.5.1 | SUSE-SU-2022:0735-1 |
| SUSE Manager Proxy 4.1 | zsh | 5.6-7.5.1 | SUSE-SU-2022:0735-1 |
| SUSE Linux Enterprise Point of Sale 11 SP3 | zsh | 4.3.6-67.9.8.1 | SUSE-SU-2022:14910-1 |
| SUSE HPE Helion OpenStack 8 | zsh | 5.0.5-6.19.1 | SUSE-SU-2022:0733-1 |
| SUSE Enterprise Storage 7 | zsh | 5.6-7.5.1 | SUSE-SU-2022:0735-1 |
| SUSE Enterprise Storage 6 | zsh | 5.6-7.5.1 | SUSE-SU-2022:0735-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | zsh | 5.8-7.7 | openSUSE-SU-2024:11543-1 |
| openSUSE Leap 15.3 | zsh | 5.6-7.5.1 | openSUSE-SU-2022:0735-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | zsh | 5.8-r0 | — |
| Alpine v3.23 | zsh | 5.8-r0 | — |
| Alpine v3.22 | zsh | 5.8-r0 | — |
| Alpine v3.21 | zsh | 5.8-r0 | — |
| Alpine v3.20 | zsh | 5.8-r0 | — |
Show 8 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | zsh | 5.8-r0 | — |
| Alpine v3.18 | zsh | 5.8-r0 | — |
| Alpine v3.17 | zsh | 5.8-r0 | — |
| Alpine v3.16 | zsh | 5.8-r0 | — |
| Alpine v3.15 | zsh | 5.8-r0 | — |
| Alpine v3.14 | zsh | 5.8-r0 | — |
| Alpine v3.13 | zsh | 5.8-r0 | — |
| Alpine v3.12 | zsh | 5.8-r0 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2 | zsh +1 | 5.7.1-6.amzn2.0.1 | ALAS2-2020-1439 |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 8 | zsh +1 | 5.5.1-6.el8_1.2 | ELSA-2020-0903 |
| Oracle Linux 7 | zsh +1 | 5.0.2-34.el7_7.2 | ELSA-2020-0853 |
Advisories 18
- ALSA-2020:0903 Important: zsh security update AlmaLinux Security Advisories · Oct 29, 2026
- RHSA-2020:0978 Red Hat Security Advisory: zsh security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2020:0903 Red Hat Security Advisory: zsh security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2020:0892 Red Hat Security Advisory: zsh security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2020:0853 Red Hat Security Advisory: zsh security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- USN-5325-1 zsh vulnerabilities Ubuntu Security Notices (USN) · Jun 25, 2026
- DLA-2470-1 zsh - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-2117-1 zsh - security update Debian Security (DSA / DLA) · Mar 9, 2026
- RLSA-2020:0903 Important: zsh security update Rocky Linux Security Advisories · Feb 5, 2026
- openSUSE-SU-2022:0735-1 Security update for zsh SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:0732-1 Security update for zsh SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:11543-1 zsh-5.8-7.7 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:0733-1 Security update for zsh SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:0735-1 Security update for zsh SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:14910-1 Security update for zsh SUSE / openSUSE Security Updates · Feb 4, 2026
- ALAS2-2020-1439 Important: zsh security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Jun 17, 2020
- ELSA-2020-0903 Important: zsh security update (Oracle Linux 8) Oracle Linux Security Advisories (ELSA) · Mar 19, 2020
- ELSA-2020-0853 Important: zsh security update (Oracle Linux 7) Oracle Linux Security Advisories (ELSA) · Mar 18, 2020
References
- http://zsh.sourceforge.net/releases.html
- https://github.com/XMB5/zsh-privileged-upgrade
- https://www.zsh.org/mla/zsh-announce/141
- [debian-lts-announce] 20200302 [SECURITY] [DLA 2117-1] zsh security update mailing-list
- FEDORA-2020-3f38f3e517 vendor-advisory
- FEDORA-2020-9009363f0f vendor-advisory
- GLSA-202003-55 vendor-advisory
- https://support.apple.com/kb/HT211170
- https://support.apple.com/kb/HT211175
- https://support.apple.com/kb/HT211171
- https://support.apple.com/kb/HT211168
- 20200529 APPLE-SA-2020-05-26-1 iOS 13.5 and iPadOS 13.5 mailing-list
- 20200529 APPLE-SA-2020-05-26-5 watchOS 6.2.5 mailing-list
- 20200529 APPLE-SA-2020-05-26-3 macOS Catalina 10.15.5, Security Update 2020-003 Mojave, Security Update 2020-003 High Sierra mailing-list
- 20200529 APPLE-SA-2020-05-26-4 tvOS 13.4.5 mailing-list
- https://support.apple.com/HT211168
- https://support.apple.com/HT211170
- https://support.apple.com/HT211171
- https://support.apple.com/HT211175
- [debian-lts-announce] 20201201 [SECURITY] [DLA 2470-1] zsh security update mailing-list