CVE-2022-24725

lowpriority · track · 22EPSS 0.005 · 43 %ileEUUS
grimoire priorityP3 · Track
Exploitable?
—
no known exploitation
Likely / severe?
0.50% (43rd) EPSS
CVSS 1.9 · low
Is it mine?
3 products
Check your exposure
Who says so?
4 sources
cnnvd · enisa_euvd · nvd · osv

EPSS · scored 2026-10-27

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, "\\~")`.

01

cvss

Technical severity, 0–10. One row per scoring source.

6.2
010

base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · low–medium · 1.9–6.2

v2.01.9lowAV:L/AC:M/Au:N/C:P/I:N/A:Nprimary · NVD / NIST USexploitability 3.4 · impact 2.9
v3.15.5mediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:Nprimary · NVD / NIST USexploitability 1.8 · impact 3.6
v3.16.2mediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:Nsecondary · ENISA EU
v3.16.2mediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:Nsecondary · security-advisories@github.comexploitability 2.5 · impact 3.6
v3.15.5mediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:Nsecondary · OSV
v3.15.1mediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N/E:Usecondary · CVSS-BT (t0sche)
02

ssvc

A stakeholder decision — act, attend, or track — from exploitation and impact.

Exploitation: poc · Automatable: no · Technical Impact: partialcoordinatorcisa_ssvcUS
03

weaknesses

The CWE weakness classes this flaw belongs to.

04

affected products (3)

Products and version ranges known to be affected.

05

advisories (1)

Vendor and ecosystem advisories describing this.

  • GHSA-446w-rrm4-r47fExposure of home directory through shescape on Unix with Bash2022-03-03ghsa · osvUS

    ### Impact The issue 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. ```javascript const cp = require("child_process"); const shescape = require("shescape"); const payload = "home_directory=~"; const options = { interpolation: true }; console.log(cp.execSync(`echo ${shescape.escape(payload, options)}`)); // home_directory=/home/user ``` Depending on how the output of _shescape_ is used, directory traversal may be possible in the application using _shescape_. ### Patches The issue was patched in `v1.5.1`. ### Workarounds Manually escape all instances of the tilde character (`~`) using `arg.replace(/~/g, "\\~")`. ### References See GitHub issue https://github.com/ericcornelissen/shescape/issues/169.

06

also known as (3)

Other names and identifiers for this entity.

07

sources

Which sources assert this record, and when.

published 2022-03-03modified 2026-06-17
09

references (10)

External citations — patches, advisories, analysis.

scry

Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.

Free scan