CVE-2022-24725Shescape Project Shescape
Medium 5.5
Follow: this CVE · Shescape Project · Shescape Project Shescape We alert you by email or Slack (account required).
- Priority
- 33
- CVSS 3.1
- 5.5
- EPSS
- 0.6% probability of exploitation in 30 days · percentile 46
- Auth required
- Yes
- Published
- Mar 3, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
What happens
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, "\\~")`.
What to do
- Apply the vendor's security update for Shescape.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | shescape |
≥ 1.4.0 < 1.5.1 |
1.5.1 |
npm install shescape@1.5.1 |
Per OSV / GitHub Advisories (GHSA-446w-rrm4-r47f). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| shescape_project | shescape | ≥ 1.4.0 < 1.5.1 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Exploit Issue Tracking Third Party Advisory
- github.com Patch Third Party Advisory
- github.com Exploit Third Party Advisory