What’s Vulnerable › Vulnerabilities
CVE-2021-45444
- Severity: high (CVSS 7.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 2.0% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2022-02-14 · updated 2026-06-17
Description
In zsh before 5.8.1, an attacker can achieve code execution if they control a command output inside the prompt, as demonstrated by a %F argument. This occurs because of recursive PROMPT_SUBST expansion.
Affected products
- macOS: from 10.15 before 10.15.7; 10.15.7-security_update_2020, 10.15.7-security_update_2020-001, 10.15.7-security_update_2020-005, 10.15.7-security_update_2020-007, 10.15.7-security_update_2021-001, 10.15.7-security_update_2021-002 (+7) — fixed in 10.15.7
- Apple macOS: from 11.0 before 11.6.6; from 12.0.0 before 12.4 — fixed in 11.6.6, 12.4
- Debian Linux: 9.0, 10.0, 11.0
- Fedoraproject Fedora: 34, 35
- zsh: before 5.8.1 — fixed in 5.8.1
How to fix
Upgrade to a fixed version: macOS 10.15.7; Apple macOS 11.6.6, 12.4; zsh 5.8.1. Check the vendor advisory for mitigations.
References
- http://seclists.org/fulldisclosure/2022/May/33
- http://seclists.org/fulldisclosure/2022/May/35
- http://seclists.org/fulldisclosure/2022/May/38
- https://lists.debian.org/debian-lts-announce/2022/02/msg00020.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2P3LPMGENEHKDWFO4MWMZSZL6G7Y4CV7/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BWF3EXNBX5SVFDBL4ZFOD4GJBWFUKWN4/
- https://support.apple.com/kb/HT213255
- https://support.apple.com/kb/HT213256
- https://support.apple.com/kb/HT213257
- https://vuln.ryotak.me/advisories/63
- https://www.debian.org/security/2022/dsa-5078
- https://zsh.sourceforge.io/releases.html
Get alerted when CVE-2021-45444 or the next vulnerability affects your stack