Skip to main content
MEDIUM

CVE-2022-24725

CVSS v3

5.5

MEDIUM

EPSS Score

0.5 %

exploit probability, as of 2026-10-18

CISA KEV

No

known exploited

Exploitation

—

SSVC status

Get an alert for each new CVE published for shescape.

Set up CVE WatchFree account · no credit card

Affected and fixed versions

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • shescapenpmfrom 1.4.0 · fixed in 1.5.1

Full record on NVD

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

Technical details

Published
2022-03-03

Frequently asked questions

What is CVE-2022-24725?

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

Is CVE-2022-24725 actively exploited?

Active exploitation of CVE-2022-24725 has not been confirmed. Its EPSS score was 0.5% on 2026-10-18, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2022-24725?

CVE-2022-24725 has a CVSS v3 base score of 5.5 (MEDIUM severity).

Running shescape? Hear about its next vulnerability

CVE Watch matches each new CVE to the vendors and products you list (vendor and product, not the version) and puts it in your alerts with its KEV and EPSS status.

Already have an account? Open CVE WatchNo credit card required · No monthly cap on website lookups · 250 API requests/month