Bug 1626187 (CVE-2018-0502)

Summary: CVE-2018-0502 zsh: Improper parsing of the shebang line with special chars
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dmaphy, james.antill, j, kdudka, svashisht
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: zsh 5.6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-05 09:46:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1626190, 1626191    
Bug Blocks: 1626189    

Description Pedro Sampaio 2018-09-06 17:28:17 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.

Upstream patch:

https://sourceforge.net/p/zsh/code/ci/1c4c7b6a4d17294df028322b70c53803a402233d

References:

https://www.zsh.org/mla/zsh-announce/136

Comment 1 Pedro Sampaio 2018-09-06 17:29:52 UTC
Created zsh tracking bugs for this issue:

Affects: fedora-all [bug 1626190]

Comment 3 Riccardo Schirone 2018-10-05 09:46:37 UTC
Closing this as NOTABUG and asked to MITRE to reject the CVE. Executing the second line of a script is not a security issue, since in the moment you execute a script you already expect all commands inside it to be executed.

Comment 4 Doran Moppert 2020-02-11 00:31:20 UTC
Statement:

Red Hat Product Security determined that this flaw was not a security vulnerability. See the Bugzilla link for more details.