All the vulnerabilities related to the version 0.2.0 of the package
Cross-Site Scripting in serialize-to-js
Versions of serialize-to-js
prior to 3.0.1 are vulnerable to Cross-Site Scripting (XSS). The package fails to sanitize serialized regular expressions. This vulnerability does not affect Node.js applications.
Upgrade to version 3.0.1 or later.
Code Execution Through IIFE in serialize-to-js
Affected versions of serialize-to-js
may be vulnerable to arbitrary code execution through an Immediately Invoked Function Expression (IIFE).
var payload = "{e: (function(){ eval('console.log(`exploited`)') })() }"
var serialize = require('serialize-to-js');
serialize.deserialize(payload);
Update to version 1.0.0, or later, and review this disclaimer from the author.
Denial of Service in serialize-to-js
Versions of serialize-to-js
prior to 2.0.0 are vulnerable to Denial of Service. User input is not properly validated, allowing attackers to provide inputs that lead the execution to loop indefinitely.
Upgrade to version 2.0.0 or later.