CVE-2022-24725
published medium CVSS 3.1 · 6.2Exposure of home directory through shescape on Unix with Bash
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| ericcornelissen | — | shescape>= 1.4.0, < 1.5.1 | Affected | Not stated | GitHub_M |
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, "\\~")`.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 6.2 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| ericcornelissen | shescape | >= 1.4.0, < 1.5.1 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-200 CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
References
3Provider assertions
3GitHub_M · cna
Exposure of home directory through shescape on Unix with Bash
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 26133eb47ea8062b3c947b785611446a7f9f9556d6625b19d7e8881c5cc7c5c8
- Ingested
- 23 Sep 2026, 07:58:57 UTC
- Source record
- Official CVE record