SecurityContext

CVE-2018-0502: zsh - Command Injection

  • Cve: CVE-2018-0502
  • Name: zsh - Command Injection
  • 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.
  • Impact: Local attackers can execute arbitrary programs by crafting malicious scripts, leading to privilege escalation or arbitrary code execution.
  • Remediation: Update to version 5.6 or later.
  • Vulnerability type: command_injection
  • Vulnerability impact: remote_code_execution, privilege_escalation
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: critical
  • Cvss score: 9.8
  • Cvss vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Epss score: 0.02487
  • Epss percentile: 0.85033
  • Assignee: [email protected]
  • Published at: 2018-09-05T08:29:00Z
  • Age in days: 3002
  • Modified at: 2026-06-17T01:31:01Z
  • Patch available: yes
  • References total: 6
  • Products total: 2
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2018-0502
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, oss, projects total, projects, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-20Improper Input Validation

References

Same in every row:

  • Source: nvd
UrlTags
https://bugs.debian.org/908000Mailing List, Patch, Third Party Advisory
https://sourceforge.net/p/zsh/code/ci/1c4c7b6a4d17294df028322b70c53803a402233dPatch, Third Party Advisory
https://www.zsh.org/mla/zsh-announce/136Mailing List, Vendor Advisory
https://security.gentoo.org/glsa/201903-02Third Party Advisory
https://usn.ubuntu.com/3764-1/Third Party Advisory
https://lists.debian.org/debian-lts-announce/2020/12/msg00000.html

Products

ProductAffectedPlatform boundSourcesUrl
zsh:zsh< 5.6nonvd/v1/products/zsh/zsh
canonical:ubuntu_linux= 18.04, = 16.04, = 14.04nonvd/v1/products/canonical/ubuntu_linux

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Remote: yes
  • Exposed hosts: 21109361
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports