All reports
Medium

zsh: Improper handling of shebang line longer than 64

Affected versions

Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2018-13259

Probability of exploitation in the next 30 days: 2.72%

FIRST EPSS · 2026-11-19

Description

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.

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.