# CVE-2025-66648: `vega-functions` vulnerable to Cross-site Scripting via `setdata` function

> Attackers can execute arbitrary JavaScript via the setdata function in vega-functions, affecting sites processing untrusted user input.

- **Severity:** High 7.2 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 5 Jan 2026
- **Updated:** 6 Jan 2026
- **Also known as:** DEBIAN-CVE-2025-66648, GHSA-m9rg-mr6g-75gm, UBUNTU-CVE-2025-66648

## What is CVE-2025-66648?

CVE-2025-66648 is a high-severity cross-site scripting vulnerability in vega, published on 5 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2025-66648?

2 open source packages ship an affected version, including vega-functions. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `vega-functions` | npm | All versions | 6.1.1 |
| `vega-functions` | npm | All versions | 6.1.1 |

Products: Vega-Functions Project Vega-Functions.

## How do I fix CVE-2025-66648?

Upgrade vega-functions to 6.1.1 or later.

## Is CVE-2025-66648 being exploited?

There is no known exploitation of CVE-2025-66648 in the wild and no public exploit code.

## Other vulnerabilities in vega

- [CVE-2023-26486](https://insights.sbomify.com/CVE-2023-26486/): Vega `scale` expression function cross site scripting (medium 6.5)
- [CVE-2023-26487](https://insights.sbomify.com/CVE-2023-26487/): Vega has cross-site scripting vulnerability in `lassoAppend` function (medium 6.5)
- [CVE-2025-26619](https://insights.sbomify.com/CVE-2025-26619/): Vega Cross-Site Scripting (XSS) via event filter when not using CSP mode `expressionInterpeter` (medium 5.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-66648 and fix it if it is affected.

What it is: CVE-2025-66648 is a high-severity cross-site scripting vulnerability in vega, published on 5 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-66648 in the wild and no public exploit code.

Affected packages and fixed versions:
- vega-functions (npm): affected all versions; fixed in 6.1.1
- vega-functions (npm): affected all versions; fixed in 6.1.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-66648/ (Markdown: https://insights.sbomify.com/CVE-2025-66648/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-66648
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-66648
- OSV: https://osv.dev/vulnerability/CVE-2025-66648

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-66648/
Summaries are generated and may contain mistakes; the official description above is the record.
