Read the docs
TI-2022-08540 Aliases CVE-2022-24725GHSA-446w-rrm4-r47f

Exposure of home directory through shescape on Unix with Bash

Priority MEDIUM 61CWE-200Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Information disclosure, Code execution
Confidentiality · integrity · availability
High · None · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-200 and CWE-78.

Summary

Shescape is a shell escape package for JavaScript. An issue in versions 1.4.0 to 1.5.1 allows for exposure of the home directory on Unix systems when using Bash with the `escape` or `escapeAll` functions from the _shescape_ API with the `interpolation` option set to `true`. Other tested shells, Dash and Zsh, are not affected. Depending on how the output of _shescape_ is used, directory traversal may be possible in the application using _shescape_. The issue was patched in version 1.5.1. As a workaround, manually escape all instances of the tilde character (`~`) using `arg.replace(/~/g, "\\~")`.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00499 43rd percentileScored 2026-11-07
Public exploit Yes 2 exploit referencesTagged by NVD
Fix Fixed shescape (ericcornelissen): 1.5.1shescape (npm): 1.5.1

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
ericcornelissenshescape1.4.0 to before 1.5.11.5.1Patch availableCNA
—shescape (npm)1.4.0 to before 1.5.11.5.1Patch availableGHSA-446w-rrm4-r47f
  • shescape Vendorericcornelissen Affected 1.4.0 to before 1.5.1 Fixed in 1.5.1 Patch available CNA
  • shescape (npm) Vendor— Affected 1.4.0 to before 1.5.1 Fixed in 1.5.1 Patch available GHSA-446w-rrm4-r47f

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:shescape_project:shescape:*:*:*:*:*:node.js:*:*1.4.0 to before 1.5.1Vulnerableericcornelissen
  • cpe:2.3:a:shescape_project:shescape:*:*:*:*:*:node.js:*:* Versions 1.4.0 to before 1.5.1 Vulnerable ·ericcornelissen

Remediation

  • Fix · CNA shescape (ericcornelissen) Fixed in 1.5.1
  • Fix · GHSA-446w-rrm4-r47f shescape (npm) Fixed in 1.5.1 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2022-24725
  2. 2026-10-03 Alias added: GHSA-446w-rrm4-r47f

References

  • TI-2022-13220 Insufficient escaping of whitespace in shescape CVSS 3.1CRITICAL 9.8
  • TI-2022-13219 Insufficient escaping of line feeds for CMD in shescape CVSS 3.1CRITICAL 9.8
  • TI-2022-09469 Regular expression denial of service (ReDoS) in shescape CVSS 3.1HIGH 7.5
  • TI-2026-24632 Shescape escape() leaves bracket glob expansion active on Bash, BusyBox, and Dash CVSS 4.0MEDIUM 6.9
  • TI-2022-16487 Shescape Inefficient Regular Expression Complexity vulnerability CVSS 3.1HIGH 7.5
  • TI-2023-21058 Shescape on Windows escaping may be bypassed in threaded context CVSS 3.1HIGH 8.6
See all 8 →

Sources