CVE-2018-13259
An issue was discovered in zsh before 5.6. Shebang lines exceeding 64 characters were truncated,...
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
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.
- Record
CVE-2018-13259- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-20
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2018-13259- Updated
- 2026-11-02
EUVDEUVD-2018-5207 No score
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.
- Record
EUVD-2018-5207- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-8vj4-q4ww-8jf3
9.8
An issue was discovered in zsh before 5.6. Shebang lines exceeding 64 characters were truncated,...
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.
- Record
GHSA-8vj4-q4ww-8jf3- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-20
- Updated
- 2026-11-02
OSV
9.8
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.
- Record
CVE-2018-13259- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2018-13259
9.8
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.
- Record
DEBIAN-CVE-2018-13259- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 9 moreShow less
OSVRHSA-2019:2017
5.3
Red Hat Security Advisory: zsh security and bug fix update
- Record
RHSA-2019:2017- CVSS 3.0
- 5.3 Medium
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L - Updated
- 2026-11-02
OSVUBUNTU-CVE-2018-13259
9.8
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.
- Record
UBUNTU-CVE-2018-13259- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVCLSA-2026-1777051205 No score
zsh: Fix of 3 CVEs
- CVE-2018-1071: check bounds when copying path in hashcmd()
- CVE-2018-7549: avoid crash copying empty hash table
- CVE-2018-13259: fix shebang line truncation in zexecve()
- Record
CLSA-2026-1777051205- Updated
- 2026-11-02
OSVCLSA-2026-1777051545 No score
zsh: Fix of 3 CVEs
- CVE-2018-1071: check bounds when copying path in hashcmd()
- CVE-2018-7549: avoid crash copying empty hash table
- CVE-2018-13259: fix shebang line truncation in zexecve()
- Record
CLSA-2026-1777051545- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11543-1 No score
zsh-5.8-7.7 on GA media
These are all security issues fixed in the zsh-5.8-7.7 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11543-1- Updated
- 2026-11-02
OSVSUSE-SU-2018:2686-1 No score
Security update for zsh
This update for zsh to version 5.6 fixes the following security issues:
- CVE-2018-0502: The beginning of a #! script file was mishandled, potentially leading to an execve call to a program named on the second line (bsc#1107296).
- CVE-2018-13259: 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 (bsc#1107294).
- Record
SUSE-SU-2018:2686-1- Updated
- 2026-11-02
OSVSUSE-SU-2022:0161-1 No score
Security update for zsh
This update for zsh fixes the following issues:
- CVE-2018-0502: Fixed execve call vulnerability to program named on the second line when the beginning of a #! script file was mishandled. (bsc#1107296, bsc#1107294)
- CVE-2018-13259: Fixed execve call vulnerability to program name that is a substring of the intended one. (bsc#1107296, bsc#1107294)
- Record
SUSE-SU-2022:0161-1- Updated
- 2026-11-02
OSVSUSE-SU-2022:14910-1 No score
Security update for zsh
This update for zsh fixes the following issues:
- CVE-2019-20044: Fixed an insecure dropping of privileges when unsetting the PRIVILEGED option (bsc#1163882).
- CVE-2018-13259: Fixed an unexpected truncation of long shebang lines (bsc#1107294).
- CVE-2018-7549: Fixed a crash when an empty hash table (bsc#1082991).
- CVE-2018-1083: Fixed a stack-based buffer overflow when using tab completion on directories with long names (bsc#1087026).
- CVE-2018-1071: Fixed a stack-based buffer overflow when executing certain commands (bsc#1084656).
- CVE-2018-0502: Fixed a mishandling of shebang lines (bsc#1107296).
- CVE-2017-18206: Fixed a buffer overflow related to symlink processing (bsc#1083002).
- CVE-2017-18205: Fixed an application crash when using cd with no arguments (bsc#1082998).
- CVE-2016-10714: Fixed a potential application crash when handling maximum length paths (bsc#1083250).
- CVE-2014-10072: Fixed a buffer overflow when scanning very long directory paths for symbolic links (bsc#1082975).
- CVE-2014-10071: Fixed a buffer overflow when redirecting output to a long file descriptor (bsc#1082977).
- CVE-2014-10070: Fixed a privilege escalation vulnerability via environment variables (bsc#1082885).
- Record
SUSE-SU-2022:14910-1- Updated
- 2026-11-02
OSVUSN-3764-1 No score
zsh vulnerabilities
It was discovered that Zsh incorrectly handled certain scripts. An attacker could possibly use this issue to execute arbitrary code. (CVE-2018-0502, CVE-2018-13259)
Richard Maciel Costa discovered that Zsh incorrectly handled certain scripts. An attacker could possibly use this issue to execute arbitrary code. (CVE-2018-1100)
- Record
USN-3764-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
zshTuxCare:CentOS:6 From an advisory covering 3 CVEs |
before 4.3.11-11.el6_10.tuxcare.els1 | 4.3.11-11.el6_10.tuxcare.els1 |
zsh-htmlTuxCare:CentOS:6 From an advisory covering 3 CVEs |
before 4.3.11-11.el6_10.tuxcare.els1 | 4.3.11-11.el6_10.tuxcare.els1 |
zshTuxCare:OracleLinux:6 From an advisory covering 3 CVEs |
before 4.3.11-11.el6_10.tuxcare.els1 | 4.3.11-11.el6_10.tuxcare.els1 |
zsh-htmlTuxCare:OracleLinux:6 From an advisory covering 3 CVEs |
before 4.3.11-11.el6_10.tuxcare.els1 | 4.3.11-11.el6_10.tuxcare.els1 |
zshDebian:12 |
before 5.6-1 | 5.6-1 |
zshDebian:13 |
before 5.6-1 | 5.6-1 |
zshDebian:14 |
before 5.6-1 | 5.6-1 |
zshDebian:9 From an advisory covering 7 CVEs |
before 5.3.1-4+deb9u1, plus listed versions 5.3.1-4 |
5.3.1-4+deb9u1 |
zshRed Hat:enterprise_linux:7::client |
before 0:5.0.2-33.el7 | 0:5.0.2-33.el7 |
zsh-debuginfoRed Hat:enterprise_linux:7::client |
before 0:5.0.2-33.el7 | 0:5.0.2-33.el7 |
Show 33 moreShow less
| Package | Affected | Fixed |
|---|---|---|
zsh-htmlRed Hat:enterprise_linux:7::client |
before 0:5.0.2-33.el7 | 0:5.0.2-33.el7 |
zshRed Hat:enterprise_linux:7::computenode |
before 0:5.0.2-33.el7 | 0:5.0.2-33.el7 |
zsh-debuginfoRed Hat:enterprise_linux:7::computenode |
before 0:5.0.2-33.el7 | 0:5.0.2-33.el7 |
zsh-htmlRed Hat:enterprise_linux:7::computenode |
before 0:5.0.2-33.el7 | 0:5.0.2-33.el7 |
zshRed Hat:enterprise_linux:7::server |
before 0:5.0.2-33.el7 | 0:5.0.2-33.el7 |
zsh-debuginfoRed Hat:enterprise_linux:7::server |
before 0:5.0.2-33.el7 | 0:5.0.2-33.el7 |
zsh-htmlRed Hat:enterprise_linux:7::server |
before 0:5.0.2-33.el7 | 0:5.0.2-33.el7 |
zshRed Hat:enterprise_linux:7::workstation |
before 0:5.0.2-33.el7 | 0:5.0.2-33.el7 |
zsh-debuginfoRed Hat:enterprise_linux:7::workstation |
before 0:5.0.2-33.el7 | 0:5.0.2-33.el7 |
zsh-htmlRed Hat:enterprise_linux:7::workstation |
before 0:5.0.2-33.el7 | 0:5.0.2-33.el7 |
zshSUSE:Linux Enterprise Module for Basesystem 15 From an advisory covering 2 CVEs |
before 5.6-3.6.1 | 5.6-3.6.1 |
zshSUSE:HPE Helion OpenStack 8 From an advisory covering 2 CVEs |
before 5.0.5-6.12.2 | 5.0.5-6.12.2 |
zshSUSE:OpenStack Cloud 8 From an advisory covering 2 CVEs |
before 5.0.5-6.12.2 | 5.0.5-6.12.2 |
zshSUSE:OpenStack Cloud 9 From an advisory covering 2 CVEs |
before 5.0.5-6.12.2 | 5.0.5-6.12.2 |
zshSUSE:OpenStack Cloud Crowbar 8 From an advisory covering 2 CVEs |
before 5.0.5-6.12.2 | 5.0.5-6.12.2 |
zshSUSE:OpenStack Cloud Crowbar 9 From an advisory covering 2 CVEs |
before 5.0.5-6.12.2 | 5.0.5-6.12.2 |
zshSUSE:Linux Enterprise Server for SAP Applications 12 SP3 From an advisory covering 2 CVEs |
before 5.0.5-6.12.2 | 5.0.5-6.12.2 |
zshSUSE:Linux Enterprise Server for SAP Applications 12 SP4 From an advisory covering 2 CVEs |
before 5.0.5-6.12.2 | 5.0.5-6.12.2 |
zshSUSE:Linux Enterprise Server 12 SP2-BCL From an advisory covering 2 CVEs |
before 5.0.5-6.12.2 | 5.0.5-6.12.2 |
zshSUSE:Linux Enterprise Server 12 SP3-LTSS From an advisory covering 2 CVEs |
before 5.0.5-6.12.2 | 5.0.5-6.12.2 |
zshSUSE:Linux Enterprise Server 12 SP3-BCL From an advisory covering 2 CVEs |
before 5.0.5-6.12.2 | 5.0.5-6.12.2 |
zshSUSE:Linux Enterprise Server 12 SP4-LTSS From an advisory covering 2 CVEs |
before 5.0.5-6.12.2 | 5.0.5-6.12.2 |
zshSUSE:Linux Enterprise Server 12 SP5 From an advisory covering 2 CVEs |
before 5.0.5-6.12.2 | 5.0.5-6.12.2 |
zshSUSE:Linux Enterprise Server for SAP Applications 12 SP5 From an advisory covering 2 CVEs |
before 5.0.5-6.12.2 | 5.0.5-6.12.2 |
zshSUSE:Linux Enterprise Point of Sale 11 SP3 From an advisory covering 12 CVEs |
before 4.3.6-67.9.8.1 | 4.3.6-67.9.8.1 |
zshSUSE:Linux Enterprise Server 11 SP4-LTSS From an advisory covering 12 CVEs |
before 4.3.6-67.9.8.1 | 4.3.6-67.9.8.1 |
zshUbuntu:14.04:LTS |
before 5.0.2-3ubuntu6.3, plus listed versions 5.0.2-3ubuntu65.0.2-3ubuntu6.15.0.2-3ubuntu6.2 |
5.0.2-3ubuntu6.3 |
zshUbuntu:16.04:LTS |
before 5.1.1-1ubuntu2.3, plus listed versions 5.1.1-1ubuntu15.1.1-1ubuntu25.1.1-1ubuntu2.15.1.1-1ubuntu2.2 |
5.1.1-1ubuntu2.3 |
zshUbuntu:18.04:LTS |
before 5.4.2-3ubuntu3.1, plus listed versions 5.2-5ubuntu15.4.2-3ubuntu15.4.2-3ubuntu25.4.2-3ubuntu3 |
5.4.2-3ubuntu3.1 |
zshUbuntu:14.04:LTS From an advisory covering 3 CVEs |
before 5.0.2-3ubuntu6.3, plus listed versions 5.0.2-3ubuntu65.0.2-3ubuntu6.15.0.2-3ubuntu6.2 |
5.0.2-3ubuntu6.3 |
zshUbuntu:16.04:LTS From an advisory covering 3 CVEs |
before 5.1.1-1ubuntu2.3, plus listed versions 5.1.1-1ubuntu15.1.1-1ubuntu25.1.1-1ubuntu2.15.1.1-1ubuntu2.2 |
5.1.1-1ubuntu2.3 |
zshUbuntu:18.04:LTS From an advisory covering 3 CVEs |
before 5.4.2-3ubuntu3.1, plus listed versions 5.2-5ubuntu15.4.2-3ubuntu15.4.2-3ubuntu25.4.2-3ubuntu3 |
5.4.2-3ubuntu3.1 |
zshopenSUSE:Tumbleweed From an advisory covering 6 CVEs |
before 5.8-7.7 | 5.8-7.7 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2018-13259 is a critical vulnerability (CVSS 9.8) in Zsh, published September 5, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.72%, the 86th percentile. Fixed in zsh 5.6-1.
References
bugs.debian.org/908000
sourceforge.net/p/zsh/code/ci/1c4c7b6a4d17294df028322b70c53803a402233d
zsh.org/mla/zsh-announce/136
usn.ubuntu.com/3764-1
security.gentoo.org/glsa/201903-02
access.redhat.com/errata/RHSA-2019:2017
Show 44 moreShow less
lists.debian.org/debian-lts-announce/2020/12/msg00000.html
nvd.nist.gov/vuln/detail/CVE-2018-13259
github.com/advisories/GHSA-8vj4-q4ww-8jf3
errata.tuxcare.com/els_os/centos6els/CLSA-2026-1777051205.html
errata.tuxcare.com/els_os/oraclelinux6els/CLSA-2026-1777051545.html
security-tracker.debian.org/tracker/CVE-2018-13259
access.redhat.com/security/updates/classification
access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html-single/7.7_release_notes/index
bugzilla.redhat.com/show_bug.cgi?id=1626184
security.access.redhat.com/data/csaf/v2/advisories/2019/rhsa-2019_2017.json
access.redhat.com/security/cve/CVE-2018-13259
cve.org/CVERecord?id=CVE-2018-13259
suse.com/support/update/announcement/2018/suse-su-20182686-1
bugzilla.suse.com/1107294
bugzilla.suse.com/1107296
suse.com/security/cve/CVE-2018-0502
suse.com/security/cve/CVE-2018-13259
suse.com/support/update/announcement/2022/suse-su-20220161-1
suse.com/support/update/announcement/2022/suse-su-202214910-1
bugzilla.suse.com/1082885
bugzilla.suse.com/1082975
bugzilla.suse.com/1082977
bugzilla.suse.com/1082991
bugzilla.suse.com/1082998
bugzilla.suse.com/1083002
bugzilla.suse.com/1083250
bugzilla.suse.com/1084656
bugzilla.suse.com/1087026
bugzilla.suse.com/1163882
suse.com/security/cve/CVE-2014-10070
suse.com/security/cve/CVE-2014-10071
suse.com/security/cve/CVE-2014-10072
suse.com/security/cve/CVE-2016-10714
suse.com/security/cve/CVE-2017-18205
suse.com/security/cve/CVE-2017-18206
suse.com/security/cve/CVE-2018-1071
suse.com/security/cve/CVE-2018-1083
suse.com/security/cve/CVE-2018-7549
suse.com/security/cve/CVE-2019-20044
ubuntu.com/security/CVE-2018-13259
ubuntu.com/security/notices/USN-3764-1
ubuntu.com/security/CVE-2018-0502
ubuntu.com/security/CVE-2018-1100
suse.com/security/cve/CVE-2018-1100