Shescape: Path disclosure on Unix with Zsh
Shescape versions prior to 2.1.14 and versions 3.0.0 up to but excluding 3.0.1 on Unix systems configured to use Zsh shell are vulnerable to path disclosure. The vulnerability arises when using the escape or escapeAll functions with Zsh-specific features like EXTENDED_GLOB and MAGIC_EQUAL_SUBST, allowing attackers to leverage home directory expansion and extended glob syntax to list files and directories. This can lead to unintended information disclosure about the filesystem. The issue has been patched in versions 2.1.14 and 3.0.1. Users are advised to upgrade or apply workarounds such as disabling EXTENDED_GLOB or sanitizing inputs.
AI Analysis
Technical Summary
The Shescape library on Unix systems configured with Zsh shell is vulnerable to path disclosure when using the escape or escapeAll functions. This vulnerability is exacerbated by Zsh options EXTENDED_GLOB and MAGIC_EQUAL_SUBST, which allow attackers to exploit home directory expansion and extended glob syntax to obtain lists of files and directories. The vulnerability affects versions prior to 2.1.14 and versions from 3.0.0 up to but excluding 3.0.1. The issue has been addressed with patches in versions 2.1.14 and 3.0.1. Workarounds include avoiding Zsh, disabling EXTENDED_GLOB, or sanitizing untrusted inputs to remove special characters like ^, #, and ~.
Potential Impact
An attacker can leverage this vulnerability to disclose filesystem paths and lists of files and directories on affected Unix systems using Zsh with Shescape. This information disclosure could potentially aid further attacks or reconnaissance but does not directly allow code execution or privilege escalation based on the provided data.
Mitigation Recommendations
A fix is available in Shescape versions 2.1.14 and 3.0.1. Users should upgrade to these versions or later. For users on version 3, no further changes are required beyond upgrading. For users on version 2, upgrading is recommended as version 2 will reach end-of-life on 2026-09-28. No patches will be released for versions below 2.0.0. Alternatively, users can mitigate by not using Zsh, disabling the EXTENDED_GLOB option in Zsh, or sanitizing untrusted inputs to remove the characters ^, #, and ~.
Shescape: Path disclosure on Unix with Zsh
Description
Shescape versions prior to 2.1.14 and versions 3.0.0 up to but excluding 3.0.1 on Unix systems configured to use Zsh shell are vulnerable to path disclosure. The vulnerability arises when using the escape or escapeAll functions with Zsh-specific features like EXTENDED_GLOB and MAGIC_EQUAL_SUBST, allowing attackers to leverage home directory expansion and extended glob syntax to list files and directories. This can lead to unintended information disclosure about the filesystem. The issue has been patched in versions 2.1.14 and 3.0.1. Users are advised to upgrade or apply workarounds such as disabling EXTENDED_GLOB or sanitizing inputs.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Shescape library on Unix systems configured with Zsh shell is vulnerable to path disclosure when using the escape or escapeAll functions. This vulnerability is exacerbated by Zsh options EXTENDED_GLOB and MAGIC_EQUAL_SUBST, which allow attackers to exploit home directory expansion and extended glob syntax to obtain lists of files and directories. The vulnerability affects versions prior to 2.1.14 and versions from 3.0.0 up to but excluding 3.0.1. The issue has been addressed with patches in versions 2.1.14 and 3.0.1. Workarounds include avoiding Zsh, disabling EXTENDED_GLOB, or sanitizing untrusted inputs to remove special characters like ^, #, and ~.
Potential Impact
An attacker can leverage this vulnerability to disclose filesystem paths and lists of files and directories on affected Unix systems using Zsh with Shescape. This information disclosure could potentially aid further attacks or reconnaissance but does not directly allow code execution or privilege escalation based on the provided data.
Mitigation Recommendations
A fix is available in Shescape versions 2.1.14 and 3.0.1. Users should upgrade to these versions or later. For users on version 3, no further changes are required beyond upgrading. For users on version 2, upgrading is recommended as version 2 will reach end-of-life on 2026-09-28. No patches will be released for versions below 2.0.0. Alternatively, users can mitigate by not using Zsh, disabling the EXTENDED_GLOB option in Zsh, or sanitizing untrusted inputs to remove the characters ^, #, and ~.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-6v4m-fw66-8r4x
- Osv Schema Version
- 1.4.0
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 4.0
Threat ID: 6a6542199c2644c7f8087e6f
Added to database: 07/25/2026, 23:09:13 UTC
Last enriched: 07/25/2026, 23:50:02 UTC
Last updated: 07/26/2026, 06:42:06 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.