CVE-2017-5954
Code Execution Through IIFE in serialize-to-js
9.8
CRITICAL
CVSS 3.1
EPSS 1.7%
Description
Affected versions of `serialize-to-js` may be vulnerable to arbitrary code execution through an Immediately Invoked Function Expression (IIFE). ## Proof of Concept ```js 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](https://www.npmjs.com/package/serialize-to-js#deserialize) from the author.
How to fix CVE-2017-5954
To remediate CVE-2017-5954, upgrade the affected package to a fixed version below.
- —upgrade to 1.0.0 or later
Is CVE-2017-5954 being exploited?
Low — EPSS is 1.7%, meaning exploitation activity has not been observed at scale.
Affected packages (1)
- from 0, < 1.0.0
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | CRITICAL9.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |