GLSA-201903-02 : Zsh: User-assisted execution of arbitrary code

critical Nessus Plugin ID 122730
New! Plugin Severity Now Using CVSS v3

The calculated severity for Plugins has been updated to use CVSS v3 by default. Plugins that do not have a CVSS v3 score will fall back to CVSS v2 for calculating severity. Severity display preferences can be toggled in the settings dropdown.

Synopsis

The remote Gentoo host is missing one or more security-related patches.

Description

The remote host is affected by the vulnerability described in GLSA-201903-02 (Zsh: User-assisted execution of arbitrary code)

Two input validation errors have been discovered in how Zsh parses scripts:
Parsing a malformed shebang line could cause Zsh to call a program listed in the second line (CVE-2018-0502) Shebang lines longer than 64 characters are truncated (CVE-2018-13259) Impact :

An attacker could entice a user to execute a specially crafted script using Zsh, possibly resulting in execution of arbitrary code with the privileges of the process.
Workaround :

There is no known workaround at this time.

Solution

All Zsh users should upgrade to the latest version:
# emerge --sync # emerge --ask --oneshot --verbose '>=app-shells/zsh-5.6'

See Also

https://security.gentoo.org/glsa/201903-02

Plugin Details

Severity: Critical

ID: 122730

File Name: gentoo_GLSA-201903-02.nasl

Version: 1.2

Type: local

Published: 3/11/2019

Updated: 2/5/2020

Dependencies: ssh_get_info.nasl

Risk Information

VPR

Risk Factor: Medium

Score: 5.9

CVSS v2

Risk Factor: High

Base Score: 7.5

Temporal Score: 5.5

Vector: AV:N/AC:L/Au:N/C:P/I:P/A:P

Temporal Vector: E:U/RL:OF/RC:C

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 8.5

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

Temporal Vector: E:U/RL:O/RC:C

Vulnerability Information

CPE: p-cpe:/a:gentoo:linux:zsh, cpe:/o:gentoo:linux

Required KB Items: Host/local_checks_enabled, Host/Gentoo/release, Host/Gentoo/qpkg-list

Exploit Ease: No known exploits are available

Patch Publication Date: 3/10/2019

Vulnerability Publication Date: 9/5/2018

Reference Information

CVE: CVE-2018-0502, CVE-2018-13259

GLSA: 201903-02