CVE-2019-10806
Description
vega-util prior to 1.13.1 is vulnerable to prototype pollution via mergeConfig, allowing attackers to modify Object.prototype.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
vega-util prior to 1.13.1 is vulnerable to prototype pollution via mergeConfig, allowing attackers to modify Object.prototype.
Root
Cause
The vega.mergeConfig function in vega-util prior to version 1.13.1 did not properly sanitize object keys, specifically the __proto__ key. This allowed an attacker to inject or modify properties of Object.prototype by passing a crafted configuration object [2].
Exploitation
An attacker can exploit this vulnerability by supplying a malicious input to mergeConfig that includes a __proto__ property. No authentication is required if the attacker can control the configuration object passed to this function. The attack surface includes any application that uses vega-util's mergeConfig with user-controllable data [3].
Impact
Successful exploitation leads to prototype pollution, which can result in denial of service, property injection, or even remote code execution depending on how the polluted properties are used by other parts of the application. All instances of objects in the runtime may be affected [2].
Mitigation
The vulnerability has been patched in vega-util version 1.13.1. The fix adds an isLegalKey function that filters out keys like __proto__ in writeConfig [3]. Users should update to the latest version to mitigate this risk.
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
vega-utilnpm | < 1.13.1 | 1.13.1 |
Affected products
2- vega-util/vega-utildescription
Patches
18f33a0b5170dFix prototype pollution in mergeConfig.
2 files changed · +18 −2
packages/vega-util/src/mergeConfig.js+6 −2 modified@@ -1,6 +1,8 @@ import isArray from './isArray'; import isObject from './isObject'; +const isLegalKey = key => key !== '__proto__'; + export function mergeConfig(...configs) { return configs.reduce((out, source) => { for (var key in source) { @@ -14,7 +16,7 @@ export function mergeConfig(...configs) { // for legend block, recurse for the layout entry only // for style block, recurse for all properties // otherwise, no recursion: objects overwrite, no merging - var r = key === 'legend' ? {'layout': 1} + var r = key === 'legend' ? {layout: 1} : key === 'style' ? true : null; writeConfig(out, key, source[key], r); @@ -25,13 +27,15 @@ export function mergeConfig(...configs) { } export function writeConfig(output, key, value, recurse) { + if (!isLegalKey(key)) return; + var k, o; if (isObject(value) && !isArray(value)) { o = isObject(output[key]) ? output[key] : (output[key] = {}); for (k in value) { if (recurse && (recurse === true || recurse[k])) { writeConfig(o, k, value[k]); - } else { + } else if (isLegalKey(k)) { o[k] = value[k]; } }
packages/vega-util/test/mergeConfig-test.js+12 −0 modified@@ -78,3 +78,15 @@ tape('mergeConfig handles empty arguments', function(t) { t.deepEqual(vega.mergeConfig(null, undefined, c), c); t.end(); }); + +tape('mergeConfig must not allow prototype pollution', function(t) { + const config = {symbol: {shape: 'triangle-right'}}, + payload = JSON.parse('{"__proto__": {"vulnerable": "Polluted"}}'), + merged = vega.mergeConfig(config, payload, {symbol: payload}); + + t.equal(merged.__proto__.vulnerable, undefined); + t.equal(merged.symbol.__proto__.vulnerable, undefined); + t.equal(Object.prototype.vulnerable, undefined); + + t.end(); +}); \ No newline at end of file
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4- github.com/advisories/GHSA-6hwh-rqwf-cxxrghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2019-10806ghsaADVISORY
- github.com/vega/vega/commit/8f33a0b5170d7de4f12fc248ec0901234342367bghsax_refsource_MISCWEB
- snyk.io/vuln/SNYK-JS-VEGAUTIL-559223ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.