zsh CVE Vulnerabilities & Metrics

Focus on zsh vulnerabilities and metrics.

Last updated: 08 Mar 2025, 23:25 UTC

About zsh Security Exposure

This page consolidates all known Common Vulnerabilities and Exposures (CVEs) associated with zsh. We track both calendar-based metrics (using fixed periods) and rolling metrics (using gliding windows) to give you a comprehensive view of security trends and risk evolution. Use these insights to assess risk and plan your patching strategy.

For a broader perspective on cybersecurity threats, explore the comprehensive list of CVEs by vendor and product. Stay updated on critical vulnerabilities affecting major software and hardware providers.

Global CVE Overview

Total zsh CVEs: 12
Earliest CVE date: 04 Dec 2007, 00:46 UTC
Latest CVE date: 14 Feb 2022, 12:15 UTC

Latest CVE reference: CVE-2021-45444

Rolling Stats

30-day Count (Rolling): 0
365-day Count (Rolling): 0

Calendar-based Variation

Calendar-based Variation compares a fixed calendar period (e.g., this month versus the same month last year), while Rolling Growth Rate uses a continuous window (e.g., last 30 days versus the previous 30 days) to capture trends independent of calendar boundaries.

Variations & Growth

Month Variation (Calendar): 0%
Year Variation (Calendar): 0%

Month Growth Rate (30-day Rolling): 0.0%
Year Growth Rate (365-day Rolling): 0.0%

Monthly CVE Trends (current vs previous Year)

Annual CVE Trends (Last 20 Years)

Critical zsh CVEs (CVSS ≥ 9) Over 20 Years

CVSS Stats

Average CVSS: 6.42

Max CVSS: 7.5

Critical CVEs (≥9): 0

CVSS Range vs. Count

Range Count
0.0-3.9 1
4.0-6.9 3
7.0-8.9 9
9.0-10.0 0

CVSS Distribution Chart

Top 5 Highest CVSS zsh CVEs

These are the five CVEs with the highest CVSS scores for zsh, sorted by severity first and recency.

All CVEs for zsh

CVE-2021-45444 zsh vulnerability CVSS: 5.1 14 Feb 2022, 12:15 UTC

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.

CVE-2019-20044 zsh vulnerability CVSS: 7.2 24 Feb 2020, 14:15 UTC

In Zsh before 5.8, attackers able to execute commands can regain privileges dropped by the --no-PRIVILEGED option. Zsh fails to overwrite the saved uid, so the original privileges can be restored by executing MODULE_PATH=/dir/with/module zmodload with a module that calls setuid().

CVE-2018-13259 zsh vulnerability CVSS: 7.5 05 Sep 2018, 08:29 UTC

An issue was discovered in zsh before 5.6. Shebang lines exceeding 64 characters were truncated, potentially leading to an execve call to a program name that is a substring of the intended one.

CVE-2018-0502 zsh vulnerability CVSS: 7.5 05 Sep 2018, 08:29 UTC

An issue was discovered in zsh before 5.6. The beginning of a #! script file was mishandled, potentially leading to an execve call to a program named on the second line.

CVE-2018-1100 zsh vulnerability CVSS: 7.2 11 Apr 2018, 19:29 UTC

zsh through version 5.4.2 is vulnerable to a stack-based buffer overflow in the utils.c:checkmailpath function. A local attacker could exploit this to execute arbitrary code in the context of another user.

CVE-2018-1083 zsh vulnerability CVSS: 7.2 28 Mar 2018, 13:29 UTC

Zsh before version 5.4.2-test-1 is vulnerable to a buffer overflow in the shell autocomplete functionality. A local unprivileged user can create a specially crafted directory path which leads to code execution in the context of the user who tries to use autocomplete to traverse the before mentioned path. If the user affected is privileged, this leads to privilege escalation.

CVE-2018-1071 zsh vulnerability CVSS: 2.1 09 Mar 2018, 15:29 UTC

zsh through version 5.4.2 is vulnerable to a stack-based buffer overflow in the exec.c:hashcmd() function. A local attacker could exploit this to cause a denial of service.

CVE-2018-7549 zsh vulnerability CVSS: 5.0 27 Feb 2018, 22:29 UTC

In params.c in zsh through 5.4.2, there is a crash during a copy of an empty hash table, as demonstrated by typeset -p.

CVE-2018-7548 zsh vulnerability CVSS: 7.5 27 Feb 2018, 22:29 UTC

In subst.c in zsh through 5.4.2, there is a NULL pointer dereference when using ${(PA)...} on an empty array result.

CVE-2017-18206 zsh vulnerability CVSS: 7.5 27 Feb 2018, 22:29 UTC

In utils.c in zsh before 5.4, symlink expansion had a buffer overflow.

CVE-2016-10714 zsh vulnerability CVSS: 7.5 27 Feb 2018, 22:29 UTC

In zsh before 5.3, an off-by-one error resulted in undersized buffers that were intended to support PATH_MAX characters.

CVE-2014-10071 zsh vulnerability CVSS: 7.5 27 Feb 2018, 22:29 UTC

In exec.c in zsh before 5.0.7, there is a buffer overflow for very long fds in the ">& fd" syntax.

CVE-2007-6209 zsh vulnerability CVSS: 4.6 04 Dec 2007, 00:46 UTC

Util/difflog.pl in zsh 4.3.4 allows local users to overwrite arbitrary files via a symlink attack on temporary files.