CVE-2018-13259
published 2018-09-05CVE-2018-13259: 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…
PriorityP340critical9.8CVSS 3.0
AVNACLPRNUINSUCHIHAH
EPSS
2.72%
84.4th percentile
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.
Affected
12 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| canonical | ubuntu_linux | — | — |
| canonical | ubuntu_linux | — | — |
| canonical | ubuntu_linux | — | — |
| debian | zsh | < zsh 5.6-1 (bookworm) | zsh 5.6-1 (bookworm) |
| zsh | zsh | < 5.6 | 5.6 |
| zsh | zsh | >= 0 < 5.6-1 | 5.6-1 |
| zsh | zsh | >= 0 < 5.6-1 | 5.6-1 |
| zsh | zsh | >= 0 < 5.6-1 | 5.6-1 |
| zsh | zsh | >= 0 < 5.6-1 | 5.6-1 |
| zsh | zsh | >= 0 < 5.0.2-3ubuntu6.3 | 5.0.2-3ubuntu6.3 |
| zsh | zsh | >= 0 < 5.1.1-1ubuntu2.3 | 5.1.1-1ubuntu2.3 |
| zsh | zsh | >= 0 < 5.4.2-3ubuntu3.1 | 5.4.2-3ubuntu3.1 |
CVSS provenance
nvdv3.09.8CRITICALCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.07.5HIGHAV:N/AC:L/Au:N/C:P/I:P/A:P
osv9.8CRITICAL
vendor_debian9.8CRITICAL
vendor_redhat9.8CRITICAL
vendor_ubuntu9.8CRITICAL
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Ubuntu
Zsh vulnerabilities
vendor_ubuntu·2018-09-11·CVSS 9.8
CVE-2018-0502 [CRITICAL] Zsh vulnerabilities
Title: Zsh vulnerabilities
Summary: Zsh could be made to execute arbitrary code if it received
a specially crafted script.
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)
Instructions: After a standard system update you need to restart Zsh to make
all the necessary changes.
Red Hat
zsh: Improper handling of shebang line longer than 64
vendor_redhat·2018-09-04·CVSS 9.8
CVE-2018-13259 [CRITICAL] CWE-20 zsh: Improper handling of shebang line longer than 64
zsh: Improper handling of shebang line longer than 64
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.
It was discovered that zsh does not properly validate the shebang of input files and it truncates it to the first 64 bytes. A local attacker may use this flaw to make zsh execute a different binary than what is expected, named with a substring of the shebang one.
Statement: This issue did not affect the versions of zsh as shipped with Red Hat Enterprise Linux 5 as scripts were directly handled by the kernel and not special-handled by zsh itself.
Package: zsh (Red Hat Enterprise Linux 5) - Not affected
Package: zsh (Red Hat Enterprise Linux 6
Debian
CVE-2018-13259: zsh - An issue was discovered in zsh before 5.6. Shebang lines exceeding 64 characters...
vendor_debian·2018·CVSS 9.8
CVE-2018-13259 [CRITICAL] CVE-2018-13259: zsh - An issue was discovered in zsh before 5.6. Shebang lines exceeding 64 characters...
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.
Scope: local
bookworm: resolved (fixed in 5.6-1)
bullseye: resolved (fixed in 5.6-1)
forky: resolved (fixed in 5.6-1)
sid: resolved (fixed in 5.6-1)
trixie: resolved (fixed in 5.6-1)
GHSA
GHSA-8vj4-q4ww-8jf3: An issue was discovered in zsh before 5
ghsa_unreviewed·2022-05-13
CVE-2018-13259 [CRITICAL] CWE-20 GHSA-8vj4-q4ww-8jf3: An issue was discovered in zsh before 5
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.
OSV
zsh vulnerabilities
osv·2018-09-11·CVSS 9.8
CVE-2018-0502 [CRITICAL] zsh vulnerabilities
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)
OSV
CVE-2018-13259: An issue was discovered in zsh before 5
osv·2018-09-05·CVSS 9.8
CVE-2018-13259 [CRITICAL] CVE-2018-13259: An issue was discovered in zsh before 5
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.
No detection rules found.
No public exploits indexed.
Bugzilla
CVE-2018-13259 zsh: Improper handling of shebang line longer than 64 [fedora-all]
bugzilla·2018-09-06·CVSS 9.8
CVE-2018-13259 [CRITICAL] CVE-2018-13259 zsh: Improper handling of shebang line longer than 64 [fedora-all]
CVE-2018-13259 zsh: Improper handling of shebang line longer than 64 [fedora-all]
This is an automatically created tracking bug! It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of fedora-all.
For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.
For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs
When submitting as an update, use the fedpkg template provided in the next
comment(s). This will include the bug IDs of this tracking bug as well as
the relevant top-level CVE bugs.
Please also mention the CVE IDs being fixed in the RPM changelog and the
fedpkg commit message.
NOTE: this issue affects multiple supported vers
Bugzilla
CVE-2018-13259 zsh: Improper handling of shebang line longer than 64
bugzilla·2018-09-06·CVSS 9.8
CVE-2018-13259 [CRITICAL] CVE-2018-13259 zsh: Improper handling of shebang line longer than 64
CVE-2018-13259 zsh: Improper handling of shebang line longer than 64
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.
Upstream patch:
https://sourceforge.net/p/zsh/code/ci/1c4c7b6a4d17294df028322b70c53803a402233d
References:
https://www.zsh.org/mla/zsh-announce/136
Discussion:
Created zsh tracking bugs for this issue:
Affects: fedora-all [bug 1626185]
---
External References:
http://www.zsh.org/mla/zsh-announce/136
---
Statement:
This issue did not affect the versions of zsh as shipped with Red Hat Enterprise Linux 5 as scripts were directly handled by the kernel and not special-handled by zsh itself.
---
This issue has been addres
https://access.redhat.com/errata/RHSA-2019:2017https://bugs.debian.org/908000https://lists.debian.org/debian-lts-announce/2020/12/msg00000.htmlhttps://security.gentoo.org/glsa/201903-02https://sourceforge.net/p/zsh/code/ci/1c4c7b6a4d17294df028322b70c53803a402233dhttps://usn.ubuntu.com/3764-1/https://www.zsh.org/mla/zsh-announce/136https://access.redhat.com/errata/RHSA-2019:2017https://bugs.debian.org/908000https://lists.debian.org/debian-lts-announce/2020/12/msg00000.htmlhttps://security.gentoo.org/glsa/201903-02https://sourceforge.net/p/zsh/code/ci/1c4c7b6a4d17294df028322b70c53803a402233dhttps://usn.ubuntu.com/3764-1/https://www.zsh.org/mla/zsh-announce/136
2018-09-05
Published