cve.bz

CVE-2018-0502 Improper Input Validation

9.8 criticalEPSS 2.5%Fix available

Critical (9.8). EPSS 2.5% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

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
EPSS
2.5% (unchanged from 2.5% a week ago; 2.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 85th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-20 Improper Input Validation
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2018-0502 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2018-0502?via=ask-ai-copy and https://cve.bz/cve/CVE-2018-0502?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2018-0502 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
canonical:ubuntu_linux14.04
canonical:ubuntu_linux16.04
canonical:ubuntu_linux18.04
zsh:zshbefore 5.6

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9zsh5.3.1-4+deb9u1DLA-2470-1
Debian12, 13, 14zsh5.6-1DEBIAN-CVE-2018-0502
Ubuntu14.04:LTSzsh5.0.2-3ubuntu6.3UBUNTU-CVE-2018-0502 USN-3764-1
Ubuntu16.04:LTSzsh5.1.1-1ubuntu2.3UBUNTU-CVE-2018-0502 USN-3764-1
Ubuntu18.04:LTSzsh5.4.2-3ubuntu3.1UBUNTU-CVE-2018-0502 USN-3764-1
SUSEHPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP3-BCL and 10 morezsh5.0.5-6.12.2SUSE-SU-2022:0161-1
SUSELinux Enterprise Module for Basesystem 15zsh5.6-3.6.1SUSE-SU-2018:2686-1
SUSELinux Enterprise Point of Sale 11 SP3, Linux Enterprise Server 11 SP4-LTSSzsh4.3.6-67.9.8.1SUSE-SU-2022:14910-1
openSUSETumbleweedzsh5.8-7.7openSUSE-SU-2024:11543-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE.

Red Hat

Red Hat's statement

Red Hat Product Security determined that this flaw was not a security vulnerability. See the Bugzilla link for more details.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 5zshNot affected
Red Hat Enterprise Linux 6zshNot affected
Red Hat Enterprise Linux 7zshNot affected
Red Hat Enterprise Linux 8zshNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2018-0502.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-20 (51).

References

Check your stackJSON