CVEfocus › CVE database › CVE-2021-45444

CVE-2021-45444

EPSS 2.0% (higher than 81% of CVEs)Published 2022-02-13Updated 2024-08-04Assigner: mitre

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.

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

23Fixed
2Fix pending
1Under investigation
8Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04zshNot affected
vulnerable_code_not_present
Ubuntu 25.10zshNot affected
vulnerable_code_not_present
Ubuntu 24.04zshNot affected
vulnerable_code_not_present
Ubuntu 22.04zshUnder investigationUBUNTU-CVE-2021-45444
Ubuntu 20.04zshFixed5.8-3ubuntu1.1UBUNTU-CVE-2021-45444
Ubuntu 18.04zshFixed5.4.2-3ubuntu3.2UBUNTU-CVE-2021-45444
Ubuntu 16.04zshFix pending5.1.1-1ubuntu2.3+esm1 (Ubuntu Pro)UBUNTU-CVE-2021-45444
Ubuntu 14.04zshFix pending
Debian 14zshFixed5.8.1-1DEBIAN-CVE-2021-45444
Debian 13zshFixed5.8.1-1DEBIAN-CVE-2021-45444
Debian 12zshFixed5.8.1-1DEBIAN-CVE-2021-45444
Red Hat Enterprise Linux 9zshNot affected
Red Hat Enterprise Linux 8zshFixed0:5.5.1-9.el8RHSA-2022:2120
Red Hat Enterprise Linux 8zsh-htmlFixed0:5.5.1-9.el8RHSA-2022:2120
Red Hat Enterprise Linux 7zshNot affected
Red Hat Enterprise Linux 7zsh-htmlNot affected
Red Hat Enterprise Linux 6zshNot affected
Red Hat Enterprise Linux 6zsh-htmlNot affected
AlmaLinux 8zshFixed5.5.1-9.el8ALSA-2022:2120
AlmaLinux 8zsh-htmlFixed5.5.1-9.el8ALSA-2022:2120
Rocky Linux 8zshFixed0:5.5.1-9.el8RLSA-2022:2120
Alpine Linux 3.24zshFixed5.8.1-r0ALPINE-CVE-2021-45444
Alpine Linux 3.23zshFixed5.8.1-r0ALPINE-CVE-2021-45444
Alpine Linux 3.22zshFixed5.8.1-r0ALPINE-CVE-2021-45444
Alpine Linux 3.21zshFixed5.8.1-r0ALPINE-CVE-2021-45444
Alpine Linux 3.20zshFixed5.8.1-r0ALPINE-CVE-2021-45444
Alpine Linux 3.19zshFixed5.8.1-r0ALPINE-CVE-2021-45444
Alpine Linux 3.18zshFixed5.8.1-r0ALPINE-CVE-2021-45444
Alpine Linux 3.17zshFixed5.8.1-r0ALPINE-CVE-2021-45444
Alpine Linux 3.16zshFixed5.8.1-r0ALPINE-CVE-2021-45444
Alpine Linux 3.15zshFixed5.8.1-r0ALPINE-CVE-2021-45444
Alpine Linux 3.14zshFixed5.8.1-r0ALPINE-CVE-2021-45444
Alpine Linux 3.13zshFixed5.8.1-r0ALPINE-CVE-2021-45444
Alpine Linux 3.12zshFixed5.8.1-r0ALPINE-CVE-2021-45444

What the vendor says

As published in the CVE record by mitre, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.