CVE-2026-54639: Style Dictionary - Prototype Pollution in convertTokenData utility function
Impact Prototype pollution. A 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' }.
This has been confirmed with a test/reproduction.
You are impacted when: - direct usage of convertTokenData(tokens, { output: 'object' }); - 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. - 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.
Impact is high for this when style-dictionary is used as an integration in a NodeJS server application. Impact is moderate for when style-dictionary is used as an integration in a Web application. Impact 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.
Patches A patch has been published: version 5.4.4. Any version within range >=4.3.0 <5.4.4 contains this vulnerability, see commit hash 209085d for when the vulnerability was added.
See PR with repro + fix https://github.com/style-dictionary/style-dictionary/pull/1702
Workarounds A 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.
You 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.
js const sd = new StyleDictionary({ expand: false });
if (sd.allTokens.some(tok => tok.key.includes('proto')) { throw new Error('Found malicious token key, attempting to do prototype pollution.') }
Other sources
Style Dictionary, a build system for creating cross-platform styles, has a prototype pollution vulnerability starting in version 4.3.0 and prior to version 5.4.4. Impact users have: direct usage of convertTokenData(tokens, { output: 'object' });; indirect usage, via using Expand API; and/or indirect usage via SD's transform lifecycle. Impact is high for this when style-dictionary is used as an integration in a NodeJS server application. Impact is moderate for when style-dictionary is used as an integration in a Web application. Impact 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. A patch has been published in version 5.4.4. The only known workaround is to sanitize token data first. Whether using DTCG format or old Style Dictionary format, check the token data object recursively for any object keys that include proto.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/style-dictionaryto a version that resolves this vulnerability.Fixed in 5.4.4 - Upgrade
Upgrade
style-dictionaryto a version that resolves this vulnerability.Fixed in 5.4.4 - Configuration
Set StyleDictionary instance option expand to false (e.g., `new StyleDictionary({ expand: false })`) to prevent the additional synchronization step that can trigger prototype pollution during token expansion.
Style Dictionary expand = false - Configuration
Before calling convertTokenData(tokens, { output: 'object' }) or before relying on SD transform/Expand lifecycle, recursively sanitize/validate token data objects by checking for any object keys that include `__proto__` (for both DTCG format and old Style Dictionary format); reject/stop on any token where `tok.key` includes `__proto__`.
convertTokenData() / token data handling token key validation = reject keys containing '__proto__'
Event History
Frequently Asked Questions
What is the severity of CVE-2026-54639?
CVE-2026-54639 has a severity rating of high, with a score of 8.8.
How do I fix CVE-2026-54639?
To fix CVE-2026-54639, upgrade Style Dictionary to version 5.4.4 or later.
What is the impact of CVE-2026-54639?
The impact of CVE-2026-54639 includes the potential for prototype pollution affecting object integrity.
Which versions of Style Dictionary are affected by CVE-2026-54639?
CVE-2026-54639 affects Style Dictionary versions from 4.3.0 up to, but not including, 5.4.4.
How can I determine if I'm impacted by CVE-2026-54639?
You may be impacted by CVE-2026-54639 if you use the convertTokenData function directly or indirectly through the Expand API.