Vulnerabilities / CVE-2018-7548

critical

CVE-2018-7548

zsh: null-pointer deref when using ${(PA)...} on an empty array result

Published Modified CWE 476
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 Hat2.8CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L

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

Description

In subst.c in zsh through 5.4.2, there is a NULL pointer dereference when using ${(PA)...} on an empty array result.

Affected packages and fixed versions

SourcePackageFixed in
Photon OS 2.0zsh5.3.1-5.ph2
amazon linux 2zsh, zsh-debuginfo, zsh-html5.3.1-7.amzn2
debian 11zsh5.5-1
debian 12zsh5.5-1
debian 13zsh5.5-1
debian 14zsh5.5-1
echozsh5.5-1
ubuntu 17.10zsh5.2-5ubuntu1.1
Show all 10 entries from 8 sources
SourcePackageFixed in
Photon OS 2.0zsh5.3.1-5.ph2
amazon linux 2zsh5.3.1-7.amzn2
amazon linux 2zsh-debuginfo5.3.1-7.amzn2
amazon linux 2zsh-html5.3.1-7.amzn2
debian 11zsh5.5-1
debian 12zsh5.5-1
debian 13zsh5.5-1
debian 14zsh5.5-1
echozsh5.5-1
ubuntu 17.10zsh5.2-5ubuntu1.1

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.