Vulnerability in shescape (CVE-2026-73413)
Summary
Vulnerability in shescape (CVE-2026-73413). Risk of unauthorized operations or information disclosure. Mitigation: upgrade to 3.0.1 or later.
Original description
The description as published by the source.
Impact
This impacts users of Shescape that have flag protection enabled, which is on by default, regardless of the API being used.
An attacker can cause a runtime quadratic in the input size, causing denial of service for large inputs.
import { Shescape } from "shescape";
// 1. Prerequisites
const options = {
//flagProtection unspecified
// Or
flagProtection: true,
};
// 2. Payload
let payload = "\u0000-".repeat(32000);
// 3. Usage
const shescape = new Shescape(options);
let callback;
callback = () => shescape.escape(payload);
// Or
callback = () => shescape.escapeAll([payload]);
// Or
callback = () => shescape.quote(payload);
// Or
callback = () => shescape.quoteAll([payload]);
const t0 = process.hrtime.bigint();
callback();
const ms = Number(process.hrtime.bigint() - t0) / 1e6;
// 4. Impact
console.log("Duration:", ms);
// Outputs "Duration:" followed by a number close to 20000
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) put restrictions on the length of untrusted input or 2) strip all content before the last -…
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-73413 has been found in shescape.
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-73413" on the vendor's site.
CVE-2026-73413 (shescape) — CWE-400
Patched: 3.0.1 — apply immediately
Workaround: Alternatively, users of Shescape can 1) put restrictions on the length of untrusted input or 2) strip all content before the last - 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.
A vulnerability (CWE-400) exists in shescape.
Check the vendor advisory for the affected versions of shescape.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 3.0.1.
Workaround: Alternatively, users of Shescape can 1) put restrictions on the length of untrusted input or 2) strip all content before the last - from untrusted inputs.
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
-
1Identify exposure identify
grep -r 'shescape' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
shescapeを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
Alternatively, users of Shescape can 1) put restrictions on the length of untrusted input or 2) strip all content before the **last** `-` from untrusted inputs.パッチが適用されるまでの応急処置として、Alternatively, users of Shescape can 1) put restrictions on the length of untrusted input or 2) strip all content before the last
-from untrusted inputs. を実施。回避策の副作用 (機能低下) を確認した上で。 -
3Apply patch patch
Upgrade shescape to 3.0.1ステージング環境で 3.0.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com