{"id":"ALPINE-CVE-2021-45444","details":"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.","modified":"2025-12-03T22:49:24.292779Z","published":"2022-02-14T12:15:15.750Z","upstream":["CVE-2021-45444"],"references":[{"type":"ADVISORY","url":"https://security.alpinelinux.org/vuln/CVE-2021-45444"}],"affected":[{"package":{"name":"zsh","ecosystem":"Alpine:v3.12","purl":"pkg:apk/alpine/zsh?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.1-r0"}]}],"versions":["4.3.11-r1","4.3.12-r0","4.3.15-r0","4.3.16-r0","4.3.17-r0","5.0.0-r0","5.0.2-r0","5.0.2-r1","5.0.2-r2","5.0.4-r0","5.0.5-r0","5.0.6-r0","5.0.7-r0","5.0.8-r0","5.0.8-r1","5.1-r0","5.1.1-r0","5.1.1-r1","5.2-r0","5.2-r1","5.2-r2","5.2-r3","5.3.1-r0","5.4.1-r0","5.4.2-r0","5.4.2-r1","5.5-r0","5.5.1-r0","5.5.1-r1","5.6.2-r0","5.7.1-r0","5.8-r0","5.8-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-45444.json"}},{"package":{"name":"zsh","ecosystem":"Alpine:v3.13","purl":"pkg:apk/alpine/zsh?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.1-r0"}]}],"versions":["4.3.11-r1","4.3.12-r0","4.3.15-r0","4.3.16-r0","4.3.17-r0","5.0.0-r0","5.0.2-r0","5.0.2-r1","5.0.2-r2","5.0.4-r0","5.0.5-r0","5.0.6-r0","5.0.7-r0","5.0.8-r0","5.0.8-r1","5.1-r0","5.1.1-r0","5.1.1-r1","5.2-r0","5.2-r1","5.2-r2","5.2-r3","5.3.1-r0","5.4.1-r0","5.4.2-r0","5.4.2-r1","5.5-r0","5.5.1-r0","5.5.1-r1","5.6.2-r0","5.7.1-r0","5.8-r0","5.8-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-45444.json"}},{"package":{"name":"zsh","ecosystem":"Alpine:v3.14","purl":"pkg:apk/alpine/zsh?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.1-r0"}]}],"versions":["4.3.11-r1","4.3.12-r0","4.3.15-r0","4.3.16-r0","4.3.17-r0","5.0.0-r0","5.0.2-r0","5.0.2-r1","5.0.2-r2","5.0.4-r0","5.0.5-r0","5.0.6-r0","5.0.7-r0","5.0.8-r0","5.0.8-r1","5.1-r0","5.1.1-r0","5.1.1-r1","5.2-r0","5.2-r1","5.2-r2","5.2-r3","5.3.1-r0","5.4.1-r0","5.4.2-r0","5.4.2-r1","5.5-r0","5.5.1-r0","5.5.1-r1","5.6.2-r0","5.7.1-r0","5.8-r0","5.8-r1","5.8-r2"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-45444.json"}},{"package":{"name":"zsh","ecosystem":"Alpine:v3.15","purl":"pkg:apk/alpine/zsh?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.1-r0"}]}],"versions":["4.3.11-r1","4.3.12-r0","4.3.15-r0","4.3.16-r0","4.3.17-r0","5.0.0-r0","5.0.2-r0","5.0.2-r1","5.0.2-r2","5.0.4-r0","5.0.5-r0","5.0.6-r0","5.0.7-r0","5.0.8-r0","5.0.8-r1","5.1-r0","5.1.1-r0","5.1.1-r1","5.2-r0","5.2-r1","5.2-r2","5.2-r3","5.3.1-r0","5.4.1-r0","5.4.2-r0","5.4.2-r1","5.5-r0","5.5.1-r0","5.5.1-r1","5.6.2-r0","5.7.1-r0","5.8-r0","5.8-r1","5.8-r2","5.8-r3"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-45444.json"}},{"package":{"name":"zsh","ecosystem":"Alpine:v3.16","purl":"pkg:apk/alpine/zsh?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.1-r0"}]}],"versions":["4.3.11-r1","4.3.12-r0","4.3.15-r0","4.3.16-r0","4.3.17-r0","5.0.0-r0","5.0.2-r0","5.0.2-r1","5.0.2-r2","5.0.4-r0","5.0.5-r0","5.0.6-r0","5.0.7-r0","5.0.8-r0","5.0.8-r1","5.1-r0","5.1.1-r0","5.1.1-r1","5.2-r0","5.2-r1","5.2-r2","5.2-r3","5.3.1-r0","5.4.1-r0","5.4.2-r0","5.4.2-r1","5.5-r0","5.5.1-r0","5.5.1-r1","5.6.2-r0","5.7.1-r0","5.8-r0","5.8-r1","5.8-r2","5.8-r3","5.8-r4"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-45444.json"}},{"package":{"name":"zsh","ecosystem":"Alpine:v3.17","purl":"pkg:apk/alpine/zsh?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.1-r0"}]}],"versions":["4.3.11-r1","4.3.12-r0","4.3.15-r0","4.3.16-r0","4.3.17-r0","5.0.0-r0","5.0.2-r0","5.0.2-r1","5.0.2-r2","5.0.4-r0","5.0.5-r0","5.0.6-r0","5.0.7-r0","5.0.8-r0","5.0.8-r1","5.1-r0","5.1.1-r0","5.1.1-r1","5.2-r0","5.2-r1","5.2-r2","5.2-r3","5.3.1-r0","5.4.1-r0","5.4.2-r0","5.4.2-r1","5.5-r0","5.5.1-r0","5.5.1-r1","5.6.2-r0","5.7.1-r0","5.8-r0","5.8-r1","5.8-r2","5.8-r3","5.8-r4"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-45444.json"}},{"package":{"name":"zsh","ecosystem":"Alpine:v3.18","purl":"pkg:apk/alpine/zsh?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.1-r0"}]}],"versions":["4.3.11-r1","4.3.12-r0","4.3.15-r0","4.3.16-r0","4.3.17-r0","5.0.0-r0","5.0.2-r0","5.0.2-r1","5.0.2-r2","5.0.4-r0","5.0.5-r0","5.0.6-r0","5.0.7-r0","5.0.8-r0","5.0.8-r1","5.1-r0","5.1.1-r0","5.1.1-r1","5.2-r0","5.2-r1","5.2-r2","5.2-r3","5.3.1-r0","5.4.1-r0","5.4.2-r0","5.4.2-r1","5.5-r0","5.5.1-r0","5.5.1-r1","5.6.2-r0","5.7.1-r0","5.8-r0","5.8-r1","5.8-r2","5.8-r3","5.8-r4"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-45444.json"}},{"package":{"name":"zsh","ecosystem":"Alpine:v3.19","purl":"pkg:apk/alpine/zsh?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.1-r0"}]}],"versions":["4.3.11-r1","4.3.12-r0","4.3.15-r0","4.3.16-r0","4.3.17-r0","5.0.0-r0","5.0.2-r0","5.0.2-r1","5.0.2-r2","5.0.4-r0","5.0.5-r0","5.0.6-r0","5.0.7-r0","5.0.8-r0","5.0.8-r1","5.1-r0","5.1.1-r0","5.1.1-r1","5.2-r0","5.2-r1","5.2-r2","5.2-r3","5.3.1-r0","5.4.1-r0","5.4.2-r0","5.4.2-r1","5.5-r0","5.5.1-r0","5.5.1-r1","5.6.2-r0","5.7.1-r0","5.8-r0","5.8-r1","5.8-r2","5.8-r3","5.8-r4"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-45444.json"}},{"package":{"name":"zsh","ecosystem":"Alpine:v3.20","purl":"pkg:apk/alpine/zsh?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.1-r0"}]}],"versions":["4.3.11-r1","4.3.12-r0","4.3.15-r0","4.3.16-r0","4.3.17-r0","5.0.0-r0","5.0.2-r0","5.0.2-r1","5.0.2-r2","5.0.4-r0","5.0.5-r0","5.0.6-r0","5.0.7-r0","5.0.8-r0","5.0.8-r1","5.1-r0","5.1.1-r0","5.1.1-r1","5.2-r0","5.2-r1","5.2-r2","5.2-r3","5.3.1-r0","5.4.1-r0","5.4.2-r0","5.4.2-r1","5.5-r0","5.5.1-r0","5.5.1-r1","5.6.2-r0","5.7.1-r0","5.8-r0","5.8-r1","5.8-r2","5.8-r3","5.8-r4"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-45444.json"}},{"package":{"name":"zsh","ecosystem":"Alpine:v3.21","purl":"pkg:apk/alpine/zsh?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.1-r0"}]}],"versions":["4.3.11-r1","4.3.12-r0","4.3.15-r0","4.3.16-r0","4.3.17-r0","5.0.0-r0","5.0.2-r0","5.0.2-r1","5.0.2-r2","5.0.4-r0","5.0.5-r0","5.0.6-r0","5.0.7-r0","5.0.8-r0","5.0.8-r1","5.1-r0","5.1.1-r0","5.1.1-r1","5.2-r0","5.2-r1","5.2-r2","5.2-r3","5.3.1-r0","5.4.1-r0","5.4.2-r0","5.4.2-r1","5.5-r0","5.5.1-r0","5.5.1-r1","5.6.2-r0","5.7.1-r0","5.8-r0","5.8-r1","5.8-r2","5.8-r3","5.8-r4"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-45444.json"}},{"package":{"name":"zsh","ecosystem":"Alpine:v3.22","purl":"pkg:apk/alpine/zsh?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.1-r0"}]}],"versions":["4.3.11-r1","4.3.12-r0","4.3.15-r0","4.3.16-r0","4.3.17-r0","5.0.0-r0","5.0.2-r0","5.0.2-r1","5.0.2-r2","5.0.4-r0","5.0.5-r0","5.0.6-r0","5.0.7-r0","5.0.8-r0","5.0.8-r1","5.1-r0","5.1.1-r0","5.1.1-r1","5.2-r0","5.2-r1","5.2-r2","5.2-r3","5.3.1-r0","5.4.1-r0","5.4.2-r0","5.4.2-r1","5.5-r0","5.5.1-r0","5.5.1-r1","5.6.2-r0","5.7.1-r0","5.8-r0","5.8-r1","5.8-r2","5.8-r3","5.8-r4"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-45444.json"}},{"package":{"name":"zsh","ecosystem":"Alpine:v3.23","purl":"pkg:apk/alpine/zsh?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.1-r0"}]}],"versions":["4.3.11-r1","4.3.12-r0","4.3.15-r0","4.3.16-r0","4.3.17-r0","5.0.0-r0","5.0.2-r0","5.0.2-r1","5.0.2-r2","5.0.4-r0","5.0.5-r0","5.0.6-r0","5.0.7-r0","5.0.8-r0","5.0.8-r1","5.1-r0","5.1.1-r0","5.1.1-r1","5.2-r0","5.2-r1","5.2-r2","5.2-r3","5.3.1-r0","5.4.1-r0","5.4.2-r0","5.4.2-r1","5.5-r0","5.5.1-r0","5.5.1-r1","5.6.2-r0","5.7.1-r0","5.8-r0","5.8-r1","5.8-r2","5.8-r3","5.8-r4"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-45444.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"}]}