← Back to CVE Explorer

CVE-2025-59840

Full vulnerability record from the local CVENow database.

Description

Vega is a visualization grammar, a declarative format for creating, saving, and sharing interactive visualization designs. In Vega prior to version 6.2.0, applications meeting 2 conditions are at risk of arbitrary JavaScript code execution, even if "safe mode" expressionInterpreter is used. They are vulnerable if they use `vega` in an application that attaches `vega` library and a `vega.View` instance similar to the Vega Editor to the global `window` and if they allow user-defined Vega `JSON` definitions (vs JSON that was is only provided through source code). Patches are available in the following Vega applications. If using the latest Vega line (6.x), upgrade to `vega` `6.2.0` / `vega-expression` `6.1.0` / `vega-interpreter` `2.2.1` (if using AST evaluator mode). If using Vega in a non-ESM environment, upgrade to `vega-expression` `5.2.1` / `1.2.1` (if using AST evaluator mode). Some workarounds are available. Do not attach `vega` View instances to global variables, and do not attach `vega` to the global window. These practices of attaching the vega library and View instances may be convenient for debugging, but should not be used in production or in any situation where vega/vega-lite definitions could be provided by untrusted parties.

Severity
HIGH
CVSS score
8.1 (v3.1)
Vulnerability status
Deferred
Source identifier
Published
2025-11-13 20:15:51.210000
Last modified
2026-10-19 13:10:00.110000
View original CVE JSON
{
  "id": "CVE-2025-59840",
  "sourceIdentifier": "[email protected]",
  "published": "2025-11-13T20:15:51.210",
  "lastModified": "2026-10-19T13:10:00.110",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "Vega is a visualization grammar, a declarative format for creating, saving, and sharing interactive visualization designs. In Vega prior to version 6.2.0, applications meeting 2 conditions are at risk of arbitrary JavaScript code execution, even if \"safe mode\" expressionInterpreter is used. They are vulnerable if they use `vega` in an application that attaches `vega` library and a `vega.View` instance similar to the Vega Editor to the global `window` and if they allow user-defined Vega `JSON` definitions (vs JSON that was is only provided through source code). Patches are available in the following Vega applications. If using the latest Vega line (6.x), upgrade to `vega` `6.2.0` / `vega-expression` `6.1.0` / `vega-interpreter`  `2.2.1` (if using AST evaluator mode). If using Vega in a non-ESM environment, upgrade to `vega-expression` `5.2.1` / `1.2.1` (if using AST evaluator mode). Some workarounds are available. Do not attach `vega` View instances to global variables, and do not attach `vega` to the global window. These practices of attaching the vega library and View instances may be convenient for debugging, but should not be used in production or in any situation where vega/vega-lite definitions could be provided by untrusted parties."
    },
    {
      "lang": "es",
      "value": "Vega es una gramática de visualización, un formato declarativo para crear, guardar y compartir diseños de visualización interactivos. En Vega Versiones anteriores a la versión 6.2.0, las aplicaciones que cumplen 2 condiciones están en riesgo de ejecución arbitraria de código JavaScript, incluso si se utiliza el expressionInterpreter en “modo seguro”. Son vulnerables si utilizan 'vega' en una aplicación que adjunta la biblioteca 'vega' y una instancia de 'vega.View' similar al Editor de Vega a la 'window' global y si permiten definiciones 'JSON' de Vega definidas por el usuario (frente a JSON que solo se proporciona a través del código fuente). Los parches están disponibles en las siguientes aplicaciones de Vega. Si utiliza la última línea de Vega (6.x), actualice a 'vega' '6.2.0' / 'vega-expression' '6.1.0' / 'vega-interpreter' '2.2.1' (si utiliza el modo de evaluador AST). Si utiliza Vega en un entorno que no sea ESM, actualice a 'vega-expression' '5.2.1' / '1.2.1' (si utiliza el modo de evaluador AST). Algunas soluciones alternativas están disponibles. No adjunte instancias de 'vega' View a variables globales, y no adjunte 'vega' a la 'window' global. Estas prácticas de adjuntar la biblioteca 'vega' y las instancias de View pueden ser convenientes para la depuración, pero no deben utilizarse en producción ni en ninguna situación en la que las definiciones de vega/vega-lite puedan ser proporcionadas por partes no confiables."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "vega",
          "product": "vega",
          "versions": [
            {
              "version": "vega < 6.2.0",
              "status": "affected"
            },
            {
              "version": "vega-expression >= 6.0.0, < 6.1.0",
              "status": "affected"
            },
            {
              "version": "vega-expression < 5.2.1",
              "status": "affected"
            },
            {
              "version": "vega-interpreter >= 2.0.0, < 2.2.1",
              "status": "affected"
            },
            {
              "version": "vega-interpreter < 1.2.1",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
          "baseScore": 8.1,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "REQUIRED",
          "scope": "UNCHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "HIGH",
          "availabilityImpact": "NONE"
        },
        "exploitabilityScore": 2.8,
        "impactScore": 5.2
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2025-11-14T15:59:50.261188Z",
          "id": "CVE-2025-59840",
          "options": [
            {
              "exploitation": "poc"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-79"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/vega/vega/security/advisories/GHSA-7f2v-3qq3-vvjf",
      "source": "[email protected]"
    }
  ]
}