Advisory

GHSA-mm62-wxc8-cf7m

Also known as: CVE-2017-5954

Summary

Code Execution Through IIFE in serialize-to-js

Details

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.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2018-07-18 18:27 UTC
Modified
2023-11-08 03:59 UTC

Affected packages and fixes

serialize-to-js

npm · All systems

Affected

  • introduced 0, fixed 1.0.0 (semver)

Fixed versions

1.0.0

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences