Skip to main content
Public proof of conceptFix available

CVE-2022-24725

A public proof of concept exists; no exploitation attested.

  • Published2022-03-03
  • Fixed in1.5.1
  • WeaknessCWE-200 · CWE-78

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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

Timeline

dates in UTC
  1. 2022-03-0322:15CVE publishedNVD

Versions per branch

NVD · OSV
Shescape project shescape
BranchAffectedFixed in
1.x≥ 1.4.0, < 1.5.11.5.1

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • ericcornelissen shescape
    Affected
    • = >= 1.4.0, < 1.5.1no fix stated

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2022-03-03

Fix

  1. Update Shescape project shescape to 1.5.1

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CISA-ADPSSVC decisionpoc2025-04-22
  • CNACVSS 3.16.2known since 2026-10-23
  • NVDCVSS 3.15.5read 2026-10-23
  • NVDCVSS 2.01.9read 2026-10-23
  • CNAweakness (CWE)CWE-200known since 2026-10-23
  • NVDweakness (CWE)CWE-78read 2026-10-23
  • FIRST EPSSEPSS score0.5 %2026-12-04
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryModerate2022-03-03

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Published
2022-03-03
Last modified
2026-06-17
NVD status
Modified
GitHub advisory
GHSA-446w-rrm4-r47f

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?

A proof-of-concept exploit exists for CVE-2022-24725, but active exploitation has not been confirmed at this time.

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

CVE-2022-24725 has a CVSS v3 base score of 5.5 (Medium severity), with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.

Running shescape? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record