{"id":"CVE-2026-73414","aliases":["EUVD-2026-57531","GHSA-w4hw-qcx7-56pr"],"status":"published","title":"Shescape: Shell injection via unescaped parentheses on Windows with CMD","description":"Shescape is a simple shell escape library for JavaScript. Prior to 2.1.14 and 3.0.1, getEscapeFunction in src/internal/win/cmd.js does not escape `(` and `)` when applications use the escape or escapeAll APIs on Windows with shell set to cmd.exe, or with shell set to true when CMD is the default. An attacker-controlled argument can break out of a parenthesized CMD construct and inject shell syntax depending on the original command, resulting in arbitrary command execution. This issue is fixed in versions 2.1.14 and 3.0.1.","severity":{"version":"4.0","score":9.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00889,"percentile":0.59818,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-150","CWE-78"],"published":"2026-07-24T22:34:23Z","modified":"2026-10-28T02:30:54Z","fixes":[{"ecosystem":"npm","package":"shescape","fixed_in":["2.1.14","3.0.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"shescape","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.14"}]}]},{"source":"ghsa","ecosystem":"npm","package":"shescape","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.0.1"}]}]},{"source":"osv","ecosystem":"npm","package":"shescape","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.1.14"}]}]},{"source":"osv","ecosystem":"npm","package":"shescape","ranges":[{"type":"SEMVER","events":[{"introduced":"3.0.0"},{"fixed":"3.0.1"}]}]}],"products":[{"vendor":"ericcornelissen","product":"shescape"}],"references":[{"url":"https://github.com/ericcornelissen/shescape/security/advisories/GHSA-w4hw-qcx7-56pr","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/ericcornelissen/shescape/pull/2649","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/ericcornelissen/shescape/pull/2651","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/ericcornelissen/shescape/commit/43d70b59d09bbe5c3fd02ef08b3a123e977ed9de","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/ericcornelissen/shescape/commit/b4b34c394e7f9da2775bb75381066b9a228c425f","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/ericcornelissen/shescape/releases/tag/v2.1.14","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/ericcornelissen/shescape/releases/tag/v3.0.1","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/ericcornelissen/shescape/blob/dea8893a5877893d8d4923dbf253080e08899e6d/docs/migration.md","tags":["web"]},{"url":"https://github.com/advisories/GHSA-w4hw-qcx7-56pr"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/73xxx/CVE-2026-73414.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-73414","tags":["advisory"]},{"url":"https://github.com/ericcornelissen/shescape","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-73414","title":"Shescape: Shell injection via unescaped parentheses on Windows with CMD","description":"Shescape is a simple shell escape library for JavaScript. Prior to 2.1.14 and 3.0.1, getEscapeFunction in src/internal/win/cmd.js does not escape `(` and `)` when applications use the escape or escapeAll APIs on Windows with shell set to cmd.exe, or with shell set to true when CMD is the default. An attacker-controlled argument can break out of a parenthesized CMD construct and inject shell syntax depending on the original command, resulting in arbitrary command execution. This issue is fixed in versions 2.1.14 and 3.0.1.","status":"published","published":"2026-08-12T19:42:55.52Z","modified":"2026-08-14T22:11:29.29Z","cvss":[{"version":"4.0","score":9.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"critical","assessor":"cna"}],"cwes":["CWE-78","CWE-150"],"updated_at":"2026-11-02T13:43:33.766176Z"}],"euvd":[{"id":"EUVD-2026-57531","description":"Shescape is a simple shell escape library for JavaScript. Prior to 2.1.14 and 3.0.1, getEscapeFunction in src/internal/win/cmd.js does not escape `(` and `)` when applications use the escape or escapeAll APIs on Windows with shell set to cmd.exe, or with shell set to true when CMD is the default. An attacker-controlled argument can break out of a parenthesized CMD construct and inject shell syntax depending on the original command, resulting in arbitrary command execution. This issue is fixed in versions 2.1.14 and 3.0.1.","status":"published","published":"2026-08-12T19:42:55Z","modified":"2026-08-14T22:11:29Z","cvss":[{"version":"4.0","score":9.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"critical"}],"updated_at":"2026-11-02T18:01:53.008072Z"}],"ghsa":[{"id":"GHSA-w4hw-qcx7-56pr","title":"Shescape: Shell injection via unescaped parentheses on Windows with CMD","description":"### Impact\n\nThis impacts users of Shescape on Windows that explicitly configure `shell` to CMD, or `true` with the default shell being CMD, using the `escape` and `escapeAll` APIs.\n\nAn attacker may be able to achieve shell injection depending on the original command.\n\n```javascript\nimport * as cp from \"node:child_process\";\nimport { Shescape } from \"shescape\";\n\n// 1. Prerequisites\nconst options = {\n    shell: \"cmd.exe\",\n    // Or\n    shell: true, // Only if the default shell is CMD\n};\n\n// 2. Payload\nconst payload = \"x) else if a==a (echo y\";\n\n// 3. Usage\nconst shescape = new Shescape(options);\nlet escapedPayload;\n\nescapedPayload = shescape.escape(payload);\n// Or\nescapedPayload = shescape.escapeAll([payload]);\n\n// And (example)\nconst result = cp.execSync(`if defined FALSY (echo ${escapedPayload})`, options);\n\n// 4. Impact\nconsole.log(result.toString());\n// Outputs \"y\" instead of \"\"\n\n```\n\n### Patches\n\nThis bug has been patched in [v2.1.14] and [v3.0.1] which you can upgrade to now.\n\nIf you are already using v3 of Shescape, no further changes are required. If you are using v2 of Shescape is recommended to upgrade as this version reaches end-of-life status on 2026-09-28, follow the [migration guide] to upgrade to v3.\n\nNo patches will be released for version of Shescape lower than v2.0.0.\n\n### Workarounds\n\nAlternatively, users of Shescape can remove all instances of `(` and `)` from untrusted inputs.\n\n### For more information\n\n- Comment on Pull Request [#2651] for v2 and [#2649] for v3\n- Comment on commit [b4b34c3] for v2 and [43d70b5] for v3\n- Open an issue at \u003chttps://github.com/ericcornelissen/shescape/issues\u003e (New issue \u003e Question)","status":"published","published":"2026-07-24T22:34:23Z","modified":"2026-08-12T19:43:06Z","cvss":[{"version":"4.0","score":9.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"critical"}],"cwes":["CWE-78","CWE-150"],"updated_at":"2026-11-02T14:41:00.097339Z"}],"nvd":[{"id":"CVE-2026-73414","description":"Shescape is a simple shell escape library for JavaScript. Prior to 2.1.14 and 3.0.1, getEscapeFunction in src/internal/win/cmd.js does not escape `(` and `)` when applications use the escape or escapeAll APIs on Windows with shell set to cmd.exe, or with shell set to true when CMD is the default. An attacker-controlled argument can break out of a parenthesized CMD construct and inject shell syntax depending on the original command, resulting in arbitrary command execution. This issue is fixed in versions 2.1.14 and 3.0.1.","status":"published","published":"2026-08-12T20:17:56.51Z","modified":"2026-10-24T15:10:00.19Z","cvss":[{"version":"4.0","score":9.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/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","level":"critical","assessor":"secondary"}],"cwes":["CWE-78","CWE-150"],"updated_at":"2026-11-02T14:12:37.217486Z"}],"osv":[{"id":"CVE-2026-73414","title":"Shescape: Shell injection via unescaped parentheses on Windows with CMD","description":"Shescape is a simple shell escape library for JavaScript. Prior to 2.1.14 and 3.0.1, getEscapeFunction in src/internal/win/cmd.js does not escape `(` and `)` when applications use the escape or escapeAll APIs on Windows with shell set to cmd.exe, or with shell set to true when CMD is the default. An attacker-controlled argument can break out of a parenthesized CMD construct and inject shell syntax depending on the original command, resulting in arbitrary command execution. This issue is fixed in versions 2.1.14 and 3.0.1.","status":"published","published":"2026-08-12T19:42:55.52Z","modified":"2026-10-28T02:30:54.568521781Z","cvss":[{"version":"4.0","score":9.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"critical"}],"cwes":["CWE-150","CWE-78"],"updated_at":"2026-11-02T15:45:16.365946Z"},{"id":"GHSA-w4hw-qcx7-56pr","title":"Shescape: Shell injection via unescaped parentheses on Windows with CMD","description":"### Impact\n\nThis impacts users of Shescape on Windows that explicitly configure `shell` to CMD, or `true` with the default shell being CMD, using the `escape` and `escapeAll` APIs.\n\nAn attacker may be able to achieve shell injection depending on the original command.\n\n```javascript\nimport * as cp from \"node:child_process\";\nimport { Shescape } from \"shescape\";\n\n// 1. Prerequisites\nconst options = {\n    shell: \"cmd.exe\",\n    // Or\n    shell: true, // Only if the default shell is CMD\n};\n\n// 2. Payload\nconst payload = \"x) else if a==a (echo y\";\n\n// 3. Usage\nconst shescape = new Shescape(options);\nlet escapedPayload;\n\nescapedPayload = shescape.escape(payload);\n// Or\nescapedPayload = shescape.escapeAll([payload]);\n\n// And (example)\nconst result = cp.execSync(`if defined FALSY (echo ${escapedPayload})`, options);\n\n// 4. Impact\nconsole.log(result.toString());\n// Outputs \"y\" instead of \"\"\n\n```\n\n### Patches\n\nThis bug has been patched in [v2.1.14] and [v3.0.1] which you can upgrade to now.\n\nIf you are already using v3 of Shescape, no further changes are required. If you are using v2 of Shescape is recommended to upgrade as this version reaches end-of-life status on 2026-09-28, follow the [migration guide] to upgrade to v3.\n\nNo patches will be released for version of Shescape lower than v2.0.0.\n\n### Workarounds\n\nAlternatively, users of Shescape can remove all instances of `(` and `)` from untrusted inputs.\n\n### For more information\n\n- Comment on Pull Request [#2651] for v2 and [#2649] for v3\n- Comment on commit [b4b34c3] for v2 and [43d70b5] for v3\n- Open an issue at \u003chttps://github.com/ericcornelissen/shescape/issues\u003e (New issue \u003e Question)","status":"published","published":"2026-07-24T22:34:23Z","modified":"2026-08-12T19:59:13.898763Z","cvss":[{"version":"4.0","score":9.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"critical"}],"cwes":["CWE-150","CWE-78"],"updated_at":"2026-11-02T15:46:58.04805Z"}]}}
