rushstack
rushstack copied to clipboard
`jsonpath-plus` Critical RCE in 4.0.0, need an update to 10.0.0 to fix it.
Description:
Affected versions of this package are vulnerable to Remote Code Execution (RCE) due to improper input sanitization. An attacker can execute aribitrary code on the system by exploiting the unsafe default usage of vm in Node.
This package is present in @rushstack/heft-config-file package.json
Note:
The unsafe behavior is still available after applying the fix but it is not turned on by default.
# Path: index.js
const { JSONPath } = require("jsonpath-plus");
const data = {};
let x = JSONPath({
json: data,
path: "$[(this.constructor.constructor("require(\"child_process\").exec(\"cat /etc/passwd\")")())]"
});