Security mailing lists by PureSourceCode

CVE-2022-24725

MEDIUM 5.5CVSS 3.1

Exposure of home directory through shescape on Unix with Bash

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

Published
3 Mar 2022
Last modified
17 Jun 2026
Assigned by
security-advisories@github.com
NVD status
Modified
Weakness
CWE-200CWE-78
Also known as
GHSA-446w-rrm4-r47f
Sources
NVDJSONOSV GHSA-446w-rrm4-r47fJSON

Scores

SourceScored byVersionScoreVector / decision
NVD security-advisories@github.com (Secondary) CVSS 3.1 MEDIUM 6.2 CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
NVD nvd@nist.gov (Primary) CVSS 3.1 MEDIUM 5.5 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
OSV GitHub CVSS 3.1 MEDIUM 5.5 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
NVD nvd@nist.gov (Primary) CVSS 2.0 LOW 1.9 AV:L/AC:M/Au:N/C:P/I:N/A:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD shescape_project shescape
cpe:2.3:a:shescape_project:shescape:*:*:*:*:*:node.js:*:*
>= 1.4.0, < 1.5.1 1.5.1
OSV npm shescape >= 1.4.0, < 1.5.1 1.5.1

References

History

  • 25 Nov 2026 20:34 UTC · NVD: first stored (published 3 Mar 2022)
  • 25 Nov 2026 20:10 UTC · OSV: first stored (published 3 Mar 2022)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.