GitHub Advisoryadvisory · npm

GHSA-hxcc-f52p-wc94 Insecure serialization leading to RCE in serialize-javascript

HIGH Published 2020-08-11 Modified 2021-09-23 Official page ↗
Aliases
CVE-2020-7660
Ecosystem
npm
Packages
serialize-javascript
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-502
Reviewed
2020-08-11

Affected packages

• npm serialize-javascript: < 3.1.0 → fixed in 3.1.0

Description

serialize-javascript prior to 3.1.0 allows remote attackers to inject arbitrary code via the function "deleteFunctions" within "index.js". An object such as `{"foo": /1"/, "bar": "a\"@__R--0__@"}` was serialized as `{"foo": /1"/, "bar": "a\/1"/}`, which allows an attacker to escape the `bar` key. This requires the attacker to control the values of both `foo` and `bar` and guess the value of ``. The UID has a keyspace of approximately 4 billion making it a realistic network attack.

Related

Alias · CVE (1)

  • CVE-2020-7660 serialize-javascript prior to 3.1.0 allows remote attackers to inject arbitrary code via the function "deleteFunctions" within "index.js". vulnerability

Weakness · CWE (1)

  • CWE-502 Deserialization of Untrusted Data weakness

References