Skip to content
Heist/ feed
Back to feed
Critical

Security advisory

Type: advisorySources: OSVCVE: CVE-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 second line.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2018-0502
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 04:16 UTC · Revision 1

Source evidence

CVE-2018-0502

core-osv · Original source

Published 5 Sept 2018, 08:29 UTC

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:CVE-2018-0502
Complete source record
{
  "id": "38055301600ec626fc08b48e52278448fb2a8424971afb7948f6682a38cf6b92",
  "url": "https://osv.dev/vulnerability/CVE-2018-0502",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2018-0502",
    "summary": "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.",
    "evidence": "osv:CVE-2018-0502",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2018-0502",
      "aliases": [
        "CVE-2018-0502"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/zsh-users/zsh",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "b30b89418af2495c0d48a72573f908c4ecf05efd"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:zsh:zsh:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "5.6"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "zsh-5.5.1-test-2",
            "zsh-5.5.1-test-1",
            "zsh-5.5.1",
            "zsh-5.5",
            "zsh-5.4.2-test-2",
            "zsh-5.4.2-test-1",
            "zsh-5.4.2",
            "zsh-5.4.1",
            "5.4.1",
            "zsh-5.4",
            "5.4",
            "5.3.1-test-2",
            "zsh-5.3.1",
            "zsh-5.3",
            "zsh-5.2-test-3",
            "zsh-5.2-test-2",
            "zsh-5.2-test-1",
            "zsh-5.2",
            "zsh-5.1.1-test-3",
            "zsh-5.1.1-test-2",
            "5.1.1-test-2",
            "zsh-5.1.1-test-1",
            "zsh-5.1.1",
            "zsh-5.1-test-1",
            "zsh-5.1",
            "zsh-5.0.8-test-3",
            "zsh-5.0.8",
            "zsh-5.0.7-dev-4",
            "zsh-5.0.7-dev-2",
            "zsh-5.0.7",
            "zsh-5.0.6-dev-1",
            "zsh-5.0.6",
            "zsh-5.0.5-dev-3",
            "zsh-5.0.5-dev-2",
            "zsh-5.0.5-dev-1",
            "zsh-5.0.5",
            "zsh-5.0.4",
            "zsh-5.0.3",
            "zsh-5.0.2-test-3",
            "zsh-5.0.2-test-2",
            "zsh-5.0.2-test-1",
            "zsh-5.0.2",
            "zsh-5.0.1",
            "zsh-5.0.0-test-1",
            "zsh-5.0.0",
            "zsh-4.3.17-test-2",
            "zsh-4.3.17",
            "zsh-4.3.16",
            "zsh-4.3.15",
            "zsh-4.3.14",
            "zsh-4.3.13",
            "zsh-4.3.12-test-3",
            "zsh-4.3.12",
            "zsh-4.3.11-dev-4",
            "zsh-4.3.11",
            "zsh-4.3.10-test-3",
            "zsh-4.3.10-dev-2",
            "zsh-4.3.10",
            "zsh-4.3.9-dev-5",
            "zsh-4.3.9-dev-3",
            "zsh-4.3.9",
            "zsh-4.3.8",
            "zsh-4.3.7",
            "zsh-4.3.6-dev-2",
            "zsh-4.3.6-dev-1",
            "zsh-4.3.6",
            "zsh-4.3.5-dev-4",
            "zsh-4.3.5-dev-3",
            "zsh-4.3.5-dev-2",
            "zsh-4.3.5-dev-1",
            "zsh-4.3.5",
            "zsh-4.3.4-dev-8",
            "zsh-4.3.4-dev-7",
            "zsh-4.3.4-dev-6",
            "zsh-4.3.4-dev-5",
            "zsh-4.3.4-dev-4",
            "zsh-4.3.4-dev-2",
            "zsh-4.3.4",
            "zsh-4.3.3",
            "zsh-4.3.2",
            "zsh-4.3.1",
            "zsh-4.3.0-dev-5",
            "zsh-4.3.0-dev-4",
            "zsh-4.3.0-dev-3",
            "zsh-4.2.3",
            "zsh-4.2.2",
            "zsh-4.2.1",
            "zsh-4.2.1-test-A",
            "zsh-4.2.0",
            "zsh-4.2.0-pre-4",
            "zsh-4.2.0-pre-3",
            "zsh-4.2.0-pre-2",
            "zsh-4.2.0-pre-1",
            "zsh-4.1.1",
            "zsh-4.1.1-test-3",
            "zsg-4.1.1-test-2",
            "zsh-4.1.1-test-1",
            "zsh-4.1.0-dev-7",
            "post-opt-arg",
            "pre-opt-arg",
            "zsh-4.1.0-dev-5",
            "zsh-4.1.0-dev-4",
            "zsh-4.1.0-dev-3",
            "zsh-4.1.0-dev-2",
            "zsh-4.1.0-dev-1",
            "zsh-4.0.1",
            "zsh-4.0.1-pre-5",
            "zsh-4.0.1-pre-4",
            "zsh-4.0.1-pre-3",
            "pre-func-move",
            "zsh-4.0.2-pre-2",
            "zsh-4.0.1-pre-1",
            "zsh-3.1.9-dev-8",
            "zsh-3.1.9-dev-7",
            "zsh-3.1.9-dev-6",
            "zsh-3.1.9-dev-5",
            "zsh-3.1.9-dev-4",
            "zsh-3.1.9-dev-3",
            "zsh-3.1.9-dev-2",
            "zsh-3.1.9-dev-1",
            "zsh-3.1.9",
            "zsh-3.1.8",
            "zsh-3.1.7",
            "zsh-3.1.7-pre-4",
            "zsh-3.1.7-pre-3",
            "zsh-3.1.7-pre-2",
            "zsh-3.1.7-prep-1",
            "zsh-3.1.6-dev-22",
            "zsh-3.1.6-dev-21"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2018-0502.json"
          }
        }
      ],
      "modified": "2026-10-24T10:30:16.243816842Z",
      "provider": "osv",
      "references": [
        "https://lists.debian.org/debian-lts-announce/2020/12/msg00000.html",
        "https://security.gentoo.org/glsa/201903-02",
        "https://usn.ubuntu.com/3764-1/",
        "https://www.zsh.org/mla/zsh-announce/136",
        "https://bugs.debian.org/908000",
        "https://sourceforge.net/p/zsh/code/ci/1c4c7b6a4d17294df028322b70c53803a402233d"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*",
              "cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*",
              "cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*"
            ],
            "vendor_product": "canonical:ubuntu_linux",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "14.04"
                  },
                  {
                    "last_affected": "14.04"
                  },
                  {
                    "introduced": "16.04"
                  },
                  {
                    "last_affected": "16.04"
                  },
                  {
                    "introduced": "18.04"
                  },
                  {
                    "last_affected": "18.04"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2018-0502",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 429312,
  "published_at": "2018-09-05T08:29:00.23+00:00"
}