{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-24725","id":"CVE-2022-24725","title":"Exposure of home directory through shescape on Unix with Bash","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 m","descriptionLong":"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, \"\\\\~\")`.","published":"2022-03-03T21:35:10.000Z","updated":"2026-10-28T02:30:20.863115021Z","reserved":"2022-02-10T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":6.2,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":6.2,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":6.2,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","rating":"medium","source":"github.com"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":6.2,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","rating":"medium","source":"GitHub"},{"version":"2.0","score":1.9,"vector":"AV:L/AC:M/Au:N/C:P/I:N/A:N","rating":"low","source":"NVD"}],"rating":"medium","products":["ericcornelissen shescape"],"affectedProducts":[{"vendor":"ericcornelissen","product":"shescape","defaultStatus":null,"versions":[{"status":"affected","version":">= 1.4.0, < 1.5.1"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"shescape","purl":"pkg:npm/shescape","ranges":[">=1.4.0 <1.5.1"],"fixed":["1.5.1"],"advisory":"GHSA-446w-rrm4-r47f"}],"cwes":["CWE-200","CWE-78"],"aliases":["GHSA-446w-rrm4-r47f"],"references":[{"url":"https://github.com/ericcornelissen/shescape/security/advisories/GHSA-446w-rrm4-r47f","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Third Party Advisory","advisory","web"]},{"url":"https://github.com/ericcornelissen/shescape/issues/169","tags":["x_refsource_MISC","x_transferred","Exploit","Issue Tracking","Third Party Advisory","report","web"]},{"url":"https://github.com/ericcornelissen/shescape/pull/170","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24725.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24725","tags":["advisory"]},{"url":"https://github.com/ericcornelissen/shescape","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.00499,"epssPercentile":0.43558,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-24725","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24725","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-24725","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-446w-rrm4-r47f","ok":true,"note":"GHSA-446w-rrm4-r47f"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-24725","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}