CVE-2022-24725
What it is
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, "\\~")`.
At a glance
- Exploitability
- Can be exploited locally on the machine without logging in. High risk of data exposure.
- Exploit odds
- 0.5% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 0.5% in the next 30 days (EPSS).
- Severity: 6.2 MEDIUM (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 0.5% · EPSS, next 30 days
- Weakness
- CWE-200 · Information exposure
- Record status
- Modified
Affected
- Shescape Project Shescape < 1.5.1
Attack profile CVSS 3.1 · 6.2
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Raw vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2022-24725.md and follow it. Check whether this project is affected by CVE-2022-24725. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/ericcornelissen/shescape/pull/170
- https://github.com/ericcornelissen/shescape/security/advisories/GHSA-446w-rrm4-r47f
- https://github.com/ericcornelissen/shescape/pull/170
- https://github.com/ericcornelissen/shescape/security/advisories/GHSA-446w-rrm4-r47f
References
- https://github.com/ericcornelissen/shescape/issues/169
- https://github.com/ericcornelissen/shescape/pull/170
- https://github.com/ericcornelissen/shescape/security/advisories/GHSA-446w-rrm4-r47f
- https://github.com/ericcornelissen/shescape/issues/169
- https://github.com/ericcornelissen/shescape/pull/170
- https://github.com/ericcornelissen/shescape/security/advisories/GHSA-446w-rrm4-r47f