{ "schema_version": "1.4.0", "id": "GHSA-vj5c-m527-mpff", "modified": "2026-07-28T22:23:03Z", "published": "2026-07-28T22:23:03Z", "aliases": [ "CVE-2026-54639" ], "summary": "Style Dictionary - Prototype Pollution in convertTokenData utility function", "details": "### Impact\nPrototype pollution.\nA malicious user can create a token array `[{ key: '{__proto__.foo}', value: 'malicious' }]`, when processed by `convertTokenData()` utility function, it will pollute the Object.prototype globally where `{}.foo` will equal `{ key: '{__proto__.foo}', value: 'malicious' }`.\n\nThis has been confirmed with a test/reproduction.\n\nYou are impacted when:\n- direct usage of `convertTokenData(tokens, { output: 'object' });`\n- indirect usage, via using Expand API https://styledictionary.com/reference/config/#expand. If your expand config deems it necessary to run expand (this means, if NOT: 1) set to false, 2) all subprops set to false, or 3) undefined), then we sync the `sd.tokens` property with the `sd.tokenMap` property by converting tokenData map back to object.\n- indirect usage via SD's transform lifecycle. Once your tokens are transformed, we also have to sync the `sd.tokens` property with the `sd.tokenMap` property.\n\nImpact is high for this when style-dictionary is used as an integration in a NodeJS server application.\nImpact is moderate for when style-dictionary is used as an integration in a Web application.\nImpact is low for most common cases where the user of style-dictionary also maintains the tokens, and access is limited via read/write access to the repository/workflows where it is used.\n\n### Patches\nA patch has been published: version `5.4.4`.\nAny version within range `>=4.3.0 <5.4.4` contains this vulnerability, see commit hash 209085d for when the vulnerability was added.\n\nSee PR with repro + fix https://github.com/style-dictionary/style-dictionary/pull/1702\n\n### Workarounds\nA workaround is to sanitize your token data first. Whether using DTCG format or old Style Dictionary format, you have to check the token data object recursively for any object keys that include `__proto__`.\n\nYou can do this with the StyleDictionary instance too, just ensure that expand has to be set to false to prevent the second method of this vulnerability from happening.\n\n```js\nconst sd = new StyleDictionary({ expand: false });\n\nif (sd.allTokens.some(tok => tok.key.includes('__proto__')) {\n throw new Error('Found malicious token key, attempting to do prototype pollution.')\n}\n```", "severity": [ { "type": "CVSS_V3", "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H" } ], "affected": [ { "package": { "ecosystem": "npm", "name": "style-dictionary" }, "ranges": [ { "type": "ECOSYSTEM", "events": [ { "introduced": "4.3.0" }, { "fixed": "5.4.4" } ] } ] } ], "references": [ { "type": "WEB", "url": "https://github.com/style-dictionary/style-dictionary/security/advisories/GHSA-vj5c-m527-mpff" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-54639" }, { "type": "WEB", "url": "https://github.com/style-dictionary/style-dictionary/pull/1702" }, { "type": "WEB", "url": "https://github.com/style-dictionary/style-dictionary/commit/209085d9782cfc0783c4d983f3f1bb2c515954ec" }, { "type": "WEB", "url": "https://github.com/style-dictionary/style-dictionary/commit/23b5e8dda143441f0d6b8e2b4222e2da98058bc5" }, { "type": "PACKAGE", "url": "https://github.com/style-dictionary/style-dictionary" }, { "type": "WEB", "url": "https://github.com/style-dictionary/style-dictionary/releases/tag/v5.4.4" } ], "database_specific": { "cwe_ids": [ "CWE-1321" ], "severity": "HIGH", "github_reviewed": true, "github_reviewed_at": "2026-07-28T22:23:03Z", "nvd_published_at": "2026-06-24T01:16:25Z" } }