Vulnerabilities / CVE-2018-0502

critical

CVE-2018-0502

zsh: Improper parsing of the shebang line with special chars

Published Modified CWE 20
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat5.3CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L

Trivy's own label is CRITICAL. Rated critical by NVD, Photon OS. Rated lower by Red Hat (medium), Amazon (medium), Ubuntu (medium).

Description

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 packages and fixed versions

SourcePackageFixed in
Photon OS 2.0zsh5.3.1-9.ph2
amazon linux 2zsh, zsh-debuginfo, zsh-html5.5.1-2.amzn2.0.1
debian 11zsh5.6-1
debian 12zsh5.6-1
debian 13zsh5.6-1
debian 14zsh5.6-1
debian 8zshno fix listed
debian 9zsh5.3.1-4+deb9u1
echozsh5.6-1
ubuntu 14.04zsh5.0.2-3ubuntu6.3
ubuntu 16.04zsh5.1.1-1ubuntu2.3
ubuntu 16.04-ESMzsh5.1.1-1ubuntu2.3
Show all 16 entries from 14 sources
SourcePackageFixed in
Photon OS 2.0zsh5.3.1-9.ph2
amazon linux 2zsh5.5.1-2.amzn2.0.1
amazon linux 2zsh-debuginfo5.5.1-2.amzn2.0.1
amazon linux 2zsh-html5.5.1-2.amzn2.0.1
debian 11zsh5.6-1
debian 12zsh5.6-1
debian 13zsh5.6-1
debian 14zsh5.6-1
debian 8zshno fix listed
debian 9zsh5.3.1-4+deb9u1
echozsh5.6-1
ubuntu 14.04zsh5.0.2-3ubuntu6.3
ubuntu 16.04zsh5.1.1-1ubuntu2.3
ubuntu 16.04-ESMzsh5.1.1-1ubuntu2.3
ubuntu 18.04zsh5.4.2-3ubuntu3.1
ubuntu 18.04-ESMzsh5.4.2-3ubuntu3.1

References

All 10 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.