CVE-2018-0502
published 2018-09-05CVE-2018-0502: 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…
PriorityP342critical9.8CVSS 3.0
AVNACLPRNUINSUCHIHAH
EPSS
2.49%
83.0th percentile
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.
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 parsing of the shebang line with special chars
vendor_redhat·2018-09-04·CVSS 9.8
CVE-2018-0502 [CRITICAL] CWE-20 zsh: Improper parsing of the shebang line with special chars
zsh: Improper parsing of the shebang line with special chars
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.
Statement: Red Hat Product Security determined that this flaw was not a security vulnerability. See the Bugzilla link for more details.
Package: zsh (Red Hat Enterprise Linux 5) - Not affected
Package: zsh (Red Hat Enterprise Linux 6) - Not affected
Package: zsh (Red Hat Enterprise Linux 7) - Not affected
Package: zsh (Red Hat Enterprise Linux 8) - Not affected
Debian
CVE-2018-0502: zsh - An issue was discovered in zsh before 5.6. The beginning of a #! script file was...
vendor_debian·2018·CVSS 9.8
CVE-2018-0502 [CRITICAL] CVE-2018-0502: zsh - An issue was discovered in zsh before 5.6. The beginning of a #! script file was...
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.
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-m962-vg7f-29fx: An issue was discovered in zsh before 5
ghsa_unreviewed·2022-05-13
CVE-2018-0502 [CRITICAL] CWE-20 GHSA-m962-vg7f-29fx: An issue was discovered in zsh before 5
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.
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-0502: An issue was discovered in zsh before 5
osv·2018-09-05·CVSS 9.8
CVE-2018-0502 [CRITICAL] CVE-2018-0502: An issue was discovered in zsh before 5
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.
No detection rules found.
No public exploits indexed.
Bugzilla
CVE-2018-0502 zsh: Improper parsing of the shebang line with special chars [fedora-all]
bugzilla·2018-09-06·CVSS 9.8
CVE-2018-0502 [CRITICAL] CVE-2018-0502 zsh: Improper parsing of the shebang line with special chars [fedora-all]
CVE-2018-0502 zsh: Improper parsing of the shebang line with special chars [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 supporte
Bugzilla
CVE-2018-0502 zsh: Improper parsing of the shebang line with special chars
bugzilla·2018-09-06·CVSS 9.8
CVE-2018-0502 [CRITICAL] CVE-2018-0502 zsh: Improper parsing of the shebang line with special chars
CVE-2018-0502 zsh: Improper parsing of the shebang line with special chars
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.
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 1626190]
---
Closing this as NOTABUG and asked to MITRE to reject the CVE. Executing the second line of a script is not a security issue, since in the moment you execute a script you already expect all commands inside it to be executed.
---
Statement:
Red Hat Product Security determined that this flaw was not a se
https://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://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