First published: Thu Mar 03 2022(Updated: )
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, "\\~")`.
Credit: security-advisories@github.com
Affected Software | Affected Version | How to fix |
---|---|---|
Shescape Project Shescape Node.js | >=1.4.0<1.5.1 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2022-24725 is a vulnerability in the Shescape package for JavaScript that allows for the exposure of the home directory on Unix systems when using certain functions with specific options.
The severity of CVE-2022-24725 is medium with a CVSS score of 5.5.
The home directory can be exposed in CVE-2022-24725 when using the 'escape' or 'escapeAll' functions from the Shescape API with the 'interpolation' option set to 'true'.
Versions 1.4.0 to 1.5.1 of Shescape are affected by CVE-2022-24725.
Yes, the fix for CVE-2022-24725 can be found in the Shescape package version 1.5.2 and onwards.