Vulnerability DatabaseGHSA-w4hw-qcx7-56pr

GHSA-w4hw-qcx7-56pr
JavaScript vulnerability analysis and mitigation

Impact

This 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. An attacker may be able to achieve shell injection depending on the original command.

import * as cp from "node:child_process";
import { Shescape } from "shescape";
// 1. Prerequisites
const options = {
    shell: "cmd.exe",
    // Or
    shell: true, // Only if the default shell is CMD
};
// 2. Payload
const payload = "x) else if a==a (echo y";
// 3. Usage
const shescape = new Shescape(options);
let escapedPayload;
escapedPayload = shescape.escape(payload);
// Or
escapedPayload = shescape.escapeAll([payload]);
// And (example)
const result = cp.execSync(`if defined FALSY (echo ${escapedPayload})`, options);
// 4. Impact
console.log(result.toString());
// Outputs "y" instead of ""

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 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 remove all instances of ( and ) from untrusted inputs.

For more information


SourceNVD

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-w4hw-qcx7-56prCRITICAL9.2
  • JavaScript logoJavaScript
  • shescape
NoYesJul 24, 2026
GHSA-gm3r-q2wp-hw87HIGH8.7
  • JavaScript logoJavaScript
  • shescape
NoYesJul 24, 2026
GHSA-q53c-4prm-w95qMEDIUM6.3
  • JavaScript logoJavaScript
  • shescape
NoYesJul 24, 2026
GHSA-8q49-2h5h-434xMEDIUM5.9
  • JavaScript logoJavaScript
  • @frontmcp/adapters
NoYesJul 24, 2026
GHSA-3r53-75j5-3g7jMEDIUM5.6
  • JavaScript logoJavaScript
  • quasar
NoYesJul 24, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management