Live threats

All CVEs / Shescape Project

CVE-2022-24725Shescape Project Shescape

Medium 5.5

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
Weakness (CWE)
CWE-200, CWE-78
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, "\\~")`.

Original NVD text.

What to do

  1. Apply the vendor's security update for Shescape.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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)

VendorProductVersions
shescape_projectshescape≥ 1.4.0 < 1.5.1

Official sources

References

Links published by the sources. Open them with care.