5.3medium
Vega Cross-Site Scripting (XSS) via event filter when not using CSP mode `expressionInterpeter`
- Severity
- 5.3medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.35% (higher than 31% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-rcw3-wmx7-cphr
Description
Vega is a visualization grammar, a declarative format for creating, saving, and sharing interactive visualization designs. In `vega` 5.30.0 and lower and in `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. The issue is patched in `vega` `5.31.0` and `vega-functions` `5.16.0`. Some workarounds are available. Run `vega` without `vega.expressionInterpreter`. This mode is not the default as it is slower. Alternatively, 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| vega vega | < 5.31.0 | CVE List |
| vega (npm) | before 5.31.0 | GitHub Advisory Database |
| vega-functions (npm) | before 5.16.0 | GitHub Advisory Database |
| vega-functions_project vega-functions | before 5.16.0 | NVD |
| vega_project vega | before 5.31.0 | NVD |
All scores
| GitHub_M | 5.3medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N |
| GitHub | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
Vega is a visualization grammar, a declarative format for creating, saving, and sharing interactive visualization designs. In `vega` 5.30.0 and lower and in `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. The issue is patched in `vega` `5.31.0` and `vega-functions` `5.16.0`. Some workarounds are available. Run `vega` without `vega.expressionInterpreter`. This mode is not the default as it is slower. Alternatively, 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.
GitHub Advisory Database
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}
}
}
}
]
}
NVD (es)
Vega es una gramática de visualización, un formato declarativo para crear, guardar y compartir diseños de visualización interactivos. En `vega` 5.30.0 y anteriores, y en `vega-functions` 5.15.0 y anteriores, era posible llamar a funciones JavaScript desde el lenguaje de expresiones Vega que no estaban diseñadas para ser compatibles. El problema se ha corregido en `vega` 5.31.0` y `vega-functions` 5.16.0`. Hay algunos workarounds disponibles. Ejecute `vega` sin `vega.expressionInterpreter`. Este modo no es el predeterminado, ya que es más lento. Como workaround, el uso del intérprete descrito en el modo seguro de CSP (Política de Seguridad de Contenido) impide la ejecución de JavaScript arbitrario, por lo que los usuarios de este modo no se ven afectados por esta vulnerabilidad.
References
| https://github.com/vega/vega/security/advisories/GHSA-rcw3-wmx7-cphr | exploit, vendor-advisory, web | |
| https://github.com/vega/vega-lite/issues/9469 | issue-tracking, web | |
| https://github.com/vega/vega/issues/3984 | exploit, issue-tracking, web | |
| https://github.com/vega/vega/commit/8fc129a6f8a11e96449c4ac0f63de0e5bfc7254c | patch, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2025-26619 | advisory | |
| https://github.com/vega/vega | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-26619 changed 2025-03-27 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-rcw3-wmx7-cphr changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2025-26619 changed 2026-06-17 | Public domain |