CVE-2026-54639: Style Dictionary - Prototype Pollution in convertTokenData utility function

Published Jun 24, 2026
·
Updated

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

2 affected componentsFixes available
npm/style-dictionary>=4.3.0<5.4.4
npm/style-dictionary>=4.3.0<5.4.4
5.4.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/style-dictionary to a version that resolves this vulnerability.

    Fixed in 5.4.4
  2. Upgrade

    Upgrade style-dictionary to a version that resolves this vulnerability.

    Fixed in 5.4.4
  3. 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
  4. 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

Jun 24, 2026
CVE Published
via MITRE·12:17 AM
Data Sourced
via MITRE·12:17 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·01:16 AM
DescriptionSeverityWeakness
Jul 28, 2026
Advisory Published
via GitHub·10:23 PM
Data Sourced
via GitHub·10:23 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-54639?

CVE-2026-54639 has a severity rating of high, with a score of 8.8.

2

How do I fix CVE-2026-54639?

To fix CVE-2026-54639, upgrade Style Dictionary to version 5.4.4 or later.

3

What is the impact of CVE-2026-54639?

The impact of CVE-2026-54639 includes the potential for prototype pollution affecting object integrity.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203