CVE-2017-18205: In builtin.c in zsh before 5.4, when sh compatibility mode is used, there is a NULL pointer dereference during
CVE-2017-18205 is a high-severity flaw (CVSS 8.1) affecting zsh. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
In builtin.c in zsh before 5.4, when sh compatibility mode is used, there is a NULL pointer dereference during processing of the cd command with no argument if HOME is not set.
Why this priority
- High severity
- Remotely exploitable, no login, no user action
A fixed release or distro patch exists.
Risk facts
| CVSS score | 8.1 (High) |
| Attack vector | Network (remote) |
| Attack complexity | High |
| Privileges needed | None |
| User interaction | None |
| EPSS exploit chance | 2.0% (top 19%) |
| CISA exploited list | No |
| Weakness | CWE-476 |
| Published | 2018-02-27 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2017-18205?
zsh: upgrade to 5.4. Exact commands for each OS are on this page.
Is CVE-2017-18205 being exploited?
CVE-2017-18205 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2017-18205 affect?
CVE-2017-18205 affects zsh. Severity is high (CVSS 8.1). In builtin.c in zsh before 5.4, when sh compatibility mode is used, there is a NULL pointer dereference during processing of the cd command with no argument if HOME is not set.
How urgent is CVE-2017-18205?
Priority 54/100. High severity; Remotely exploitable, no login, no user action
Related CVEs
- CVE-2021-45444 HIGH 7.8 UPGRADE MITIGATE In zsh before 5.8.1, an attacker can achieve code execution if they control a command output inside the prompt
- CVE-2019-20044 HIGH 7.8 UPGRADE MITIGATE In Zsh before 5.8, attackers able to execute commands can regain privileges dropped by the --no-PRIVILEGED opt
- CVE-2018-7549 HIGH 7.5 UPGRADE MITIGATE In params.c in zsh through 5.4.2, there is a crash during a copy of an empty hash table, as demonstrated by ty
- CVE-2018-7548 CRITICAL 9.8 UPGRADE MITIGATE In subst.c in zsh through 5.4.2, there is a NULL pointer dereference when using ${(PA)...} on an empty array r
- CVE-2018-1100 HIGH 7.8 UPGRADE MITIGATE zsh through version 5.4.2 is vulnerable to a stack-based buffer overflow in the utils.c:checkmailpath function