CVE-2025-26619
JSON

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 packageVersionsReported by
vega vega< 5.31.0CVE List
vega (npm)before 5.31.0GitHub Advisory Database
vega-functions (npm)before 5.16.0GitHub Advisory Database
vega-functions_project vega-functionsbefore 5.16.0NVD
vega_project vegabefore 5.31.0NVD

All scores

GitHub_M5.3medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
GitHub6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-79

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 vega without vega.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

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

Sources

SourceRecordLicence
CVE ListCVE-2025-26619 changed 2025-03-27CVE Terms of Use
GitHub Advisory DatabaseGHSA-rcw3-wmx7-cphr changed 2026-09-10CC-BY-4.0
NVDCVE-2025-26619 changed 2026-06-17Public domain