Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Shescape: Path disclosure on Unix with Zsh

0
Medium
Published: 07/24/2026 (07/24/2026, 22:33:38 UTC)
Source: GCVE Database
Product: shescape

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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
Low
Vuln. Integrity
None
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Affected software

npmghsa
shescape
Affected versions
<2.1.14
npmghsa
shescape
Affected versions
>=3.0.0 <3.0.1

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

AILast updated: 07/25/2026, 23:50:02 UTC

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 ~.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses