Bug 1626184 (CVE-2018-13259) - CVE-2018-13259 zsh: Improper handling of shebang line longer than 64
Summary: CVE-2018-13259 zsh: Improper handling of shebang line longer than 64
Alias: CVE-2018-13259
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1626185 1626186 1628990
Blocks: 1626188
TreeView+ depends on / blocked
Reported: 2018-09-06 17:23 UTC by Pedro Sampaio
Modified: 2021-02-16 23:05 UTC (History)
5 users (show)

Fixed In Version: zsh 5.6
Doc Type: If docs needed, set a value
Doc Text:
It was discovered that zsh does not properly validate the shebang of input files and it truncates it to the first 64 bytes. A local attacker may use this flaw to make zsh execute a different binary than what is expected, named with a substring of the shebang one.
Clone Of:
Last Closed: 2019-08-06 19:19:43 UTC

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:2017 0 None None None 2019-08-06 12:02:06 UTC

Description Pedro Sampaio 2018-09-06 17:23:22 UTC
An issue was discovered in zsh before 5.6. Shebang lines exceeding 64 characters were truncated, potentially leading to an execve call to a program name that is a substring of the intended one.

Upstream patch:




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

Affects: fedora-all [bug 1626185]

Comment 3 Riccardo Schirone 2018-09-14 09:00:57 UTC
External References:


Comment 7 Riccardo Schirone 2018-09-14 15:18:38 UTC

This issue did not affect the versions of zsh as shipped with Red Hat Enterprise Linux 5 as scripts were directly handled by the kernel and not special-handled by zsh itself.

Comment 8 errata-xmlrpc 2019-08-06 12:02:05 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2019:2017 https://access.redhat.com/errata/RHSA-2019:2017

Comment 9 Product Security DevOps Team 2019-08-06 19:19:43 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):


Note You need to log in before you can comment on or make changes to this bug.