{"cve":"CVE-2022-24725","nvd":{"published":"2022-03-03T22:15:08.950","modified":"2026-06-17T04:32:22.800","status":"Modified","description":"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, \"\\\\~\")`.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.5},"cwes":["CWE-78","CWE-200"],"references":["https://github.com/ericcornelissen/shescape/issues/169","https://github.com/ericcornelissen/shescape/pull/170","https://github.com/ericcornelissen/shescape/security/advisories/GHSA-446w-rrm4-r47f","https://github.com/ericcornelissen/shescape/issues/169","https://github.com/ericcornelissen/shescape/pull/170"],"products":["shescape_project:shescape"],"source":"nvd","synced_at":"2026-10-19T21:28:04.509275555+00:00"},"epss":{"cve":"CVE-2022-24725","score":0.00499,"percentile":0.42809,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-446w-rrm4-r47f","url":"https://osv.dev/vulnerability/GHSA-446w-rrm4-r47f","summary":"Exposure of home directory through shescape on Unix with Bash","modified":"2023-11-08T04:08:33.838531Z","packages":[{"ecosystem":"npm","name":"shescape","purl":"pkg:npm/shescape","ranges":[">=1.4.0 <1.5.1"],"fixed":["1.5.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}