CVE-2026-54639
JSON

8.8high

Style Dictionary - Prototype Pollution in convertTokenData utility function

Severity
8.8high CVSS:3.1 by GitHub_M
Exploit likelihood
0.17% (higher than 6% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-vj5c-m527-mpff

Description

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__`.

Affected

Product or packageVersionsReported by
style-dictionary style-dictionary>= 4.3.0, < 5.4.4CVE List
style-dictionary (npm)from 4.3.0 before 5.4.4GitHub Advisory Database

All scores

GitHub_M8.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
GitHub8.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Classification

CWE-1321

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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__`.

GitHub Advisory Database
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.

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.')
}
NVD (es)

Style Dictionary, un sistema de compilación para crear estilos multiplataforma, tiene una vulnerabilidad de contaminación de prototipos a partir de la versión 4.3.0 y anterior a la versión 5.4.4. El impacto para los usuarios es: uso directo de “convertTokenData(tokens, { output: ’object’ });”; uso indirecto, a través del uso de la API de Expand; y/o uso indirecto a través del ciclo de vida de transformación de SD. El impacto es alto para esto cuando style-dictionary se utiliza como una integración en una aplicación de servidor NodeJS. El impacto es moderado para cuando style-dictionary se utiliza como una integración en una aplicación web. El impacto es bajo para la mayoría de los casos comunes donde el usuario de style-dictionary también mantiene los tokens, y el acceso está limitado a través del acceso de lectura/escritura al repositorio/flujos de trabajo donde se utiliza. Se ha publicado un parche en la versión “5.4.4”. La única solución alternativa conocida es sanear los datos del token primero. Ya sea utilizando el formato DTCG o el formato antiguo de Style Dictionary, verifique el objeto de datos del token recursivamente para cualquier clave de objeto que incluya “__proto__”.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-54639 changed 2026-06-24CVE Terms of Use
GitHub Advisory DatabaseGHSA-vj5c-m527-mpff changed 2026-07-28CC-BY-4.0
NVDCVE-2026-54639 changed 2026-10-25Public domain