Skip to content
Noroxi
CVE-2018-1071· NVD / CVE Program· CNA redhat

zsh through version 5.4.2 is vulnerable to a stack-based buffer overflow in the exec.c:hashcmd() function.

zsh through version 5.4.2 is vulnerable to a stack-based buffer overflow in the exec.c:hashcmd() function. A local attacker could exploit this to cause a denial of service.

MediumCVSS 5.5 · v3.1—No exploit Fix available
Published
Mar 9, 2018
Updated
Jun 16, 2026
EPSS
0.4% · 35th percentile
Follow this CVE

Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.

Report tools

JSON

Action score

22

Monitor

Low priority for now.

CVSS
22 / 40 · 5.5 / 10
CISA KEV
0 / 30 · Not listed
EPSS
0 / 30 · 0.4%

Affected systems

VendorProduct
zshzsh
debiandebian linux
canonicalubuntu linux
redhatenterprise linux desktop
redhatenterprise linux server
redhatenterprise linux workstation

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • canonical ubuntu linux14.04
  • canonical ubuntu linux16.04
  • canonical ubuntu linux17.10
  • debian debian linux7.0
  • redhat enterprise linux desktop7.0
  • redhat enterprise linux server7.0
  • redhat enterprise linux workstation7.0
  • zsh zshup to 5.4.2 inclusive

Versions reported by the vendor

Affected version ranges reported by the assigning authority (redhat). Independent of NVD's CPE analysis and usually ahead of it.

  • zsh zsh

    • 5.4.2affected

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Alpine:v3.10zshbefore 5.4.2-r15.4.2-r1
Alpine:v3.4zshbefore 5.2-r25.2-r2
Alpine:v3.5zshbefore 5.2-r45.2-r4
Alpine:v3.6zshbefore 5.3.1-r15.3.1-r1
Debian:12zshbefore 5.4.2-45.4.2-4
Debian:7zshbefore 4.3.17-1+deb7u24.3.17-1+deb7u2
Debian:9zshbefore 5.3.1-4+deb9u15.3.1-4+deb9u1
openSUSE:Tumbleweedzshbefore 5.8-7.75.8-7.7
Red Hat:enterprise_linux:7::clientzshbefore 0:5.0.2-31.el70:5.0.2-31.el7
Red Hat:enterprise_linux:7::clientzsh-debuginfobefore 0:5.0.2-31.el70:5.0.2-31.el7
Red Hat:enterprise_linux:7::clientzsh-htmlbefore 0:5.0.2-31.el70:5.0.2-31.el7
SUSE:Linux Enterprise Desktop 12 SP3zshbefore 5.0.5-6.7.25.0.5-6.7.2
SUSE:Linux Enterprise Module for Basesystem 15zshbefore 5.5-3.3.155.5-3.3.15
SUSE:Linux Enterprise Point of Sale 11 SP3zshbefore 4.3.6-67.9.8.14.3.6-67.9.8.1

Same product

zsh: all records

Other highest-scoring records for the same primary product.

  • CVE-2018-13259An issue was discovered in zsh before 5.6.
    40Plan
  • CVE-2018-0502An issue was discovered in zsh before 5.6.
    40Plan
  • CVE-2018-7548In subst.c in zsh through 5.4.2, there is a NULL pointer dereference when using ${(PA)...} on an empty array result.
    40Plan
  • CVE-2017-18206In utils.c in zsh before 5.4, symlink expansion had a buffer overflow.
    40Plan
  • CVE-2016-10714In zsh before 5.3, an off-by-one error resulted in undersized buffers that were intended to support PATH_MAX characters.
    40Plan
  • CVE-2014-10071In exec.c in zsh before 5.0.7, there is a buffer overflow for very long fds in the ">& fd" syntax.
    40Plan

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
alpine:zsh5.4.2-r1 · Alpine:v3.10Package registry (OSV)
debian:zsh5.4.2-4 · Debian:12Package registry (OSV)
opensuse:zsh5.8-7.7 · openSUSE:TumbleweedPackage registry (OSV)
red hat:zsh0:5.0.2-31.el7 · Red Hat:enterprise_linux:7::clientPackage registry (OSV)
red hat:zsh-debuginfo0:5.0.2-31.el7 · Red Hat:enterprise_linux:7::clientPackage registry (OSV)
red hat:zsh-html0:5.0.2-31.el7 · Red Hat:enterprise_linux:7::clientPackage registry (OSV)
suse:zsh5.0.5-6.7.2 · SUSE:Linux Enterprise Desktop 12 SP3Package registry (OSV)

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

EPSS, last 120 days

FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

No commit or PR link among the references.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

No credits in the CNA record.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

No nightly-computed relations.

Chain candidates

An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.

—

Bug bounty scope

No known public program.

Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).

Technical details

Attack conditions

  • Someone with local access to the system can trigger it.
  • A low-privileged account is enough.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
none
Integrity
none
Availability
high · the service can be disrupted
Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality impact
None
Integrity impact
None
Availability impact
High

CVSS vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

nvd-primary

Attack context

MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.

MITRE has no CAPEC/ATT&CK mapping for this CWE.

Noroxi analysis

No Noroxi analysis for this record yet

We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.

We use this product, ask for help

Change log

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

All records