Arbitrary Command Execution

Affecting windows-cpu package, ALL versions

high severity

Overview

windows-cpu is a CPU monitoring utility for windows.

Affected versions of this package are vulnerable to Arbitrary Command Execution via the findLoad method, which passes a user-inputed string to the shell without validation.

Proof of Concept: This code will open the built-in calculator program.

var win = require('windows-cpu');
wind.findLoad('foo & calc.exe');

Remediation

There is no fix version for windows-cpu.

References

Credit
Daniel Bond
Snyk ID
npm:windows-cpu:20170417
Disclosed
19 May, 2017
Published
19 May, 2017

Do your applications use this vulnerable package?