Arbitrary Command Injection Affecting whereis package, versions <0.4.1
Snyk CVSS
Attack Complexity
Low
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High
Threat Intelligence
Exploit Maturity
Proof of concept
EPSS
0.29% (69th
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 npm:whereis:20180401
- published 2 Apr 2018
- disclosed 1 Apr 2018
- credit ChALkeR
How to fix?
Upgrade whereis
to version 0.4.1 or higher.
Overview
whereis
is a tool to get the first path to a bin on any system.
Affected versions of this package are vulnerable to Arbitrary Command Injection. It concatenates unsanitized user input into exec()
command
PoC by ChALkeR
var whereis = require('whereis');
var filename = 'wget; touch /tmp/tada';
whereis(filename, function(err, path) {
console.log(path);
});
Observe file /tmp/tada created.