GHSA-hxcc-f52p-wc94

Suggest an improvement
Source
https://github.com/advisories/GHSA-hxcc-f52p-wc94
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/08/GHSA-hxcc-f52p-wc94/GHSA-hxcc-f52p-wc94.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-hxcc-f52p-wc94
Aliases
Published
2020-08-11T17:21:13Z
Modified
2023-11-01T04:53:32.104129Z
Severity
  • 8.1 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Insecure serialization leading to RCE in serialize-javascript
Details

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-<UID>-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 <UID>. The UID has a keyspace of approximately 4 billion making it a realistic network attack.

References

Affected packages

npm / serialize-javascript

Package

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

Affected ranges

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

Ecosystem specific

{
    "affected_functions": [
        "(serialize-javascript)"
    ]
}