Skip to content
Fencer Vulns
high 7.8

CVE-2021-45444 json

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…

published 2022-02-13 4 y ago modified 2026-06-17 4 mo ago also EUVD-2021-32215

cvss
7.8
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
2.0%
EPSS 2.0% chance of exploitation in 30 days, percentile 80%
public exploits
0
none known

Summary

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.

Patch / fix

  • zsh zsh 5.8.1
  • apple mac_os_x 10.15.7
  • apple macos 11.6.6, 12.4
  • zsh Debian 14, Debian 13, Debian 12 5.8.1-1

debian advisories DEBIAN-CVE-2021-45444

  • zsh Ubuntu 18.04 LTS 5.4.2-3ubuntu3.2
  • zsh Ubuntu 20.04 LTS 5.8-3ubuntu1.1
  • zsh Ubuntu Pro 16.04 LTS 5.1.1-1ubuntu2.3+esm1

ubuntu advisories UBUNTU-CVE-2021-45444

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • zsh RHEL 8 5.5.1-9.el8
  • zsh-html RHEL 8 5.5.1-9.el8

red hat advisories RHSA-2022:2120

  • zsh SLES for SAP 15 SP2, SLES for SAP 15 SP1, SLES 15 SP2-LTSS +14 more 5.6-7.5.1
  • zsh SLES for SAP 12 SP5, SLES for SAP 12 SP4, SLES for SAP 12 SP3 +10 more 5.0.5-6.19.1
  • zsh SLES for SAP 15, SLES 15-LTSS, SLE High Performance Computing 15-LTSS +1 more 5.6-3.11.1

suse advisories SUSE-SU-2022:0735-1SUSE-SU-2022:0733-1SUSE-SU-2022:0732-1

  • zsh openSUSE Tumbleweed 5.8.1-1.1
  • zsh openSUSE Leap 15.3 5.6-7.5.1

opensuse advisories openSUSE-SU-2024:11959-1openSUSE-SU-2022:0735-1

  • zsh AlmaLinux 8 5.5.1-9.el8
  • zsh-html AlmaLinux 8 5.5.1-9.el8

almalinux advisories ALSA-2022:2120

  • zsh Rocky Linux 8 5.5.1-9.el8

rocky linux advisories RLSA-2022:2120

  • zsh Alpine 3.24, Alpine 3.23, Alpine 3.22 +10 more 5.8.1-r0

alpine advisories ALPINE-CVE-2021-45444

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • zsh CBL-Mariner 2.0 5.9-1

azure linux advisories AZL-8586

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-45444 updated cvss 7.8

zsh: Prompt expansion vulnerability

  • Red Hat Enterprise Linux AppStream (v. 8) zsh 5.5.1-9.el8, zsh-html 5.5.1-9.el8 Red Hat Enterprise Linux BaseOS (v. 8) zsh 5.5.1-9.el8, zsh-html 5.5.1-9.el8
    fixed: vendor fix RHSA-2022:2120
  • Red Hat Enterprise Linux 6 zsh, zsh-html Red Hat Enterprise Linux 7 zsh, zsh-html Red Hat Enterprise Linux 9 zsh
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

1.98% chance of exploitation in the next 30 days, higher than 80% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
NVD 3.1 7.8 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD 2.0 5.1 AV:N/AC:H/Au:N/C:P/I:P/A:P

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.