Information Exposure Affecting shescape package, versions >=1.4.0 <1.5.1
Threat Intelligence
Exploit Maturity
Proof of concept
EPSS
0.14% (52nd
percentile)
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-JS-SHESCAPE-2415029
- published 4 Mar 2022
- disclosed 3 Mar 2022
- credit Unknown
Introduced: 3 Mar 2022
CVE-2022-24725 Open this link in a new tabHow to fix?
Upgrade shescape
to version 1.5.1 or higher.
Overview
shescape is a simple shell escape library
Affected versions of this package are vulnerable to Information Exposure due to possible exposure of the home directory.
PoC
const cp = require("child_process");
const shescape = require("shescape");
const payload = "home_directory=~";
const options = { interpolation: true };
console.log(cp.execSync(`echo ${shescape.escape(payload, options)}`));
// home_directory=/home/user
References
CVSS Scores
version 3.1