CVE-2022-24725
Summary
| CVE | CVE-2022-24725 |
|---|---|
| State | PUBLIC |
| Assigner | [email protected] |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2022-03-03 22:15:00 UTC |
| Updated | 2023-06-23 19:17:00 UTC |
| 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, "\\~")`. |
Risk And Classification
Problem Types: CWE-78
NVD Known Affected Configurations (CPE 2.3)
| Type | Vendor | Product | Version | Update | Edition | Language |
|---|---|---|---|---|---|---|
| Application | Shescape Project | Shescape | All | All | All | All |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| Exposure of home directory through shescape on Unix with Bash · Advisory · ericcornelissen/shescape · GitHub | CONFIRM | github.com | |
| String like `=~` in Bash not escaped properly by escape(All) with interpolation escaping enabled · Issue #169 · ericcornelissen/shescape · GitHub | MISC | github.com | |
| Escape trailing strings like `=~` for Bash-like shells by ericcornelissen · Pull Request #170 · ericcornelissen/shescape · GitHub | MISC | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.