CVE-2021-45444
JSON

7.8high

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 arg…

Severity
7.8high CVSS:3.1 by NVD
Exploit likelihood
1.98% (higher than 81% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre

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

Product or packageVersionsReported by
Unspecified productn/aCVE List
zsh zshbefore 5.8.1NVD
fedoraproject fedora34, 35NVD
debian debian_linux9.0, 10.0, 11.0NVD
apple mac_os_xfrom 10.15 before 10.15.7, 10.15.7NVD
apple macosfrom 11.0 before 11.6.6, from 12.0.0 before 12.4NVD

All scores

NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD5.1medium CVSS:2.0AV:N/AC:H/Au:N/C:P/I:P/A:P

What each source says

CVE List

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.

NVD (es)

En zsh versiones anteriores a 5.8.1, un atacante puede lograr una ejecución de código si controla la salida de un comando dentro del prompt, como lo demuestra un argumento %F. Esto ocurre debido a la expansión recursiva PROMPT_SUBST

References

https://zsh.sourceforge.io/releases.htmlrelease-notes, third-party-advisory
https://vuln.ryotak.me/advisories/63third-party-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2P3LPMGENEHKDWFO4MWMZSZL6G7Y4CV7/vendor-advisory
https://www.debian.org/security/2022/dsa-5078third-party-advisory, vendor-advisory
https://lists.debian.org/debian-lts-announce/2022/02/msg00020.htmlmailing-list, third-party-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BWF3EXNBX5SVFDBL4ZFOD4GJBWFUKWN4/vendor-advisory
https://support.apple.com/kb/HT213257third-party-advisory
https://support.apple.com/kb/HT213256third-party-advisory
https://support.apple.com/kb/HT213255third-party-advisory
http://seclists.org/fulldisclosure/2022/May/33mailing-list, third-party-advisory
http://seclists.org/fulldisclosure/2022/May/35mailing-list, third-party-advisory
http://seclists.org/fulldisclosure/2022/May/38mailing-list, third-party-advisory

Sources

SourceRecordLicence
CVE ListCVE-2021-45444 changed 2024-08-04CVE Terms of Use
NVDCVE-2021-45444 changed 2026-06-17Public domain