CVE-2022-24725: Exposure of home directory through shescape on Unix with Bash

Published Mar 3, 2022
·
Updated

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, "\\~").

Affected Software

1 affected component
Shescape Project Shescape Node.js>=1.4.0<1.5.1

Event History

Mar 3, 2022
CVE Published
via MITRE·09:35 PM
Data Sourced
via MITRE·09:35 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What is CVE-2022-24725?

CVE-2022-24725 is a vulnerability in the Shescape package for JavaScript that allows for the exposure of the home directory on Unix systems when using certain functions with specific options.

2

What is the severity of CVE-2022-24725?

The severity of CVE-2022-24725 is medium with a CVSS score of 5.5.

3

How can the home directory be exposed in CVE-2022-24725?

The home directory can be exposed in CVE-2022-24725 when using the 'escape' or 'escapeAll' functions from the Shescape API with the 'interpolation' option set to 'true'.

4

Which versions of Shescape are affected by CVE-2022-24725?

Versions 1.4.0 to 1.5.1 of Shescape are affected by CVE-2022-24725.

5

Is there a fix for CVE-2022-24725?

Yes, the fix for CVE-2022-24725 can be found in the Shescape package version 1.5.2 and onwards.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203