CVE-2022-24725 Details
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, "\\~")`.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 22, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/ericcornelissen/shescape/issues/169 | CVE | ExploitIssue TrackingThird Party Advisory |
| https://github.com/ericcornelissen/shescape/pull/170 | CVE | PatchThird Party Advisory |
| https://github.com/ericcornelissen/shescape/security/advisories/GHSA-446w-rrm4-r47f | CVE | ExploitThird Party Advisory |
| https://github.com/ericcornelissen/shescape/issues/169 | [email protected] | ExploitIssue TrackingThird Party Advisory |
| https://github.com/ericcornelissen/shescape/pull/170 | [email protected] | PatchThird Party Advisory |
| https://github.com/ericcornelissen/shescape/security/advisories/GHSA-446w-rrm4-r47f | [email protected] | ExploitThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | [email protected] |
| CWE-200 | Exposure of Sensitive Information to an Unauthorized Actor | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| shescape project shescape | >= 1.4.0, < 1.5.1 |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Nov 21, 2024 | CVE Modified | CVE |
| May 14, 2024 | CVE Modified | [email protected] |
| Jun 23, 2023 | Reanalysis | [email protected] |
| Mar 17, 2022 | Initial Analysis | [email protected] |