High, CVSS 7.8npmAmendedPublished
Synchrony deobfuscator prototype pollution vulnerability leading to arbitrary code execution
CVE-2023-45811 · GHSA-jg82-xh3w-rhxx
- Affected
- npm deobfuscator >= 2.0.1, < 2.4.4
- Fixed in
- 2.4.4· Vendor fix available
- Issue
- 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][prettier/src/main/parser.js] which can lead to arbitrary code execution. Patch A fix has been released in deobfuscator@2.4.4. Mitigation - Upgrade synchrony to v2.4.4 - Launch node with the [--disable-proto=delete][disable-proto] or [--disable-proto=throw][disable-proto] flag Proof of Concept Craft a malicious input file named poc.js as follows: Then, run synchrony poc.js from the same directory as the malicious file. Credits This vulnerability was found and disclosed by [William Khem-Marquez][SteakEnthusiast]. [LiteralMap]:…
Recommended action: Upgrade to 2.4.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.