Vulnerability Details : CVE-2022-24725
Potential exploit
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, "\\~")`.
Vulnerability category: Directory traversalInformation leak
Products affected by CVE-2022-24725
- cpe:2.3:a:shescape_project:shescape:*:*:*:*:*:node.js:*:*
Exploit prediction scoring system (EPSS) score for CVE-2022-24725
0.07%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 19 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2022-24725
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
1.9
|
LOW | AV:L/AC:M/Au:N/C:P/I:N/A:N |
3.4
|
2.9
|
NIST | |
5.5
|
MEDIUM | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
1.8
|
3.6
|
NIST | |
6.2
|
MEDIUM | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
2.5
|
3.6
|
GitHub, Inc. |
CWE ids for CVE-2022-24725
-
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.Assigned by: nvd@nist.gov (Primary)
-
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.Assigned by: security-advisories@github.com (Secondary)
References for CVE-2022-24725
-
https://github.com/ericcornelissen/shescape/issues/169
String like `=~` in Bash not escaped properly by escape(All) with interpolation escaping enabled · Issue #169 · ericcornelissen/shescape · GitHubExploit;Issue Tracking;Third Party Advisory
-
https://github.com/ericcornelissen/shescape/pull/170
Escape trailing strings like `=~` for Bash-like shells by ericcornelissen · Pull Request #170 · ericcornelissen/shescape · GitHubPatch;Third Party Advisory
-
https://github.com/ericcornelissen/shescape/security/advisories/GHSA-446w-rrm4-r47f
Exposure of home directory through shescape on Unix with Bash · Advisory · ericcornelissen/shescape · GitHubExploit;Third Party Advisory
Jump to