Categories
CVE-2026-73414

OS Command Injection in shescape (CVE-2026-73414)

Summary

OS command injection in shescape (CVE-2026-73414). Risk of unauthorized operations or information disclosure. Exploitable via shell. Mitigation: upgrade to 3.0.1 or later.

Original description

The description as published by the source.

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

  • Comment on Pull Request [#2651] for v2 and [#2649] fo…

Source: GitHub Security Advisories (Global) NVD GitHub Advisory

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-73414 has been found in shescape.
Attackers can target a specific entry point like shell over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade shescape to 3.0.1 or later.
If unsure, ask your IT team or search "shescape CVE-2026-73414" on the vendor's site.

CVE-2026-73414 (shescape) — CWE-78
Attack surface: shell / true / escape / escapeAll
Patched: 3.0.1 — apply immediately
Workaround: Alternatively, users of Shescape can remove all instances of ( and ) from untrusted inputs.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

OS command injection (CWE-78) exists in shescape. Attackers reach the vulnerable code path via shell.

📍 Affected scope

Check the vendor advisory for the affected versions of shescape. Attack surface: shell / true / escape / escapeAll.

🔥 Severity

Severity: ?. Risk of unauthorized operations or information disclosure.

🔧 How to fix

Update to 3.0.1.

🛡️ Workaround

Workaround: Alternatively, users of Shescape can remove all instances of ( and ) from untrusted inputs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'shescape' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'shescape' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で shescape を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply temporary workaround mitigate
    Alternatively, users of Shescape can remove all instances of `(` and `)` from untrusted inputs.

    パッチが適用されるまでの応急処置として、Alternatively, users of Shescape can remove all instances of ( and ) from untrusted inputs. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patch patch
    Upgrade shescape to 3.0.1

    ステージング環境で 3.0.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  4. 4
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

npm shescape
[{"type":"SEMVER","events":[{"introduced":"3.0.0"},{"fixed":"3.0.1"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details