# CVE-2025-25304: Vega allows Cross-site Scripting via the vlSelectionTuples function

- Severity: Medium 6.9 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.68%, higher than 53% of CVEs (2026-12-01)
- Published: 2025-02-14T17:33:58.000Z
- Modified: 2026-06-17T09:00:39.130Z
- Also known as: GHSA-mp7w-mhcv-673j
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

Vega is a visualization grammar, a declarative format for creating, saving, and sharing interactive visualization designs. Prior to version 5.26.0 of vega and 5.4.2 of vega-selections, the `vlSelectionTuples` function can be used to call JavaScript functions, leading to cross-site scripting.`vlSelectionTuples` calls multiple functions that can be controlled by an attacker, including one call with an attacker-controlled argument. This can be used to call `Function()` with arbitrary JavaScript and the resulting function can be called with `vlSelectionTuples` or using a type coercion to call `toString` or `valueOf`. Version 5.26.0 of vega and 5.4.2 of vega-selections fix this issue.

(As written by CVE List.)

## Affected

- vega vega: < 5.26.0
- vega (npm): before 5.26.0
- vega-selections (npm): before 5.4.2

## Every score

- GitHub_M: CVSS:4.0 6.9 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`

## References

- <https://github.com/vega/vega/security/advisories/GHSA-mp7w-mhcv-673j> (web)
- <https://github.com/vega/vega/commit/9fb9ea07e27984394e463d286eb73944fa61411e> (web)
- <https://github.com/vega/vega/blob/b45cf431cd6c0d0c0e1567f087f9b3b55bc236fa/packages/vega-selections/src/selectionTuples.js#L14> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-25304> (advisory)
- <https://github.com/vega/vega> (package)

## Sources

- CVE List: [CVE-2025-25304](https://www.cve.org/CVERecord?id=CVE-2025-25304), CVE Terms of Use, modified 2025-02-14
- GitHub Advisory Database: [GHSA-mp7w-mhcv-673j](https://github.com/advisories/GHSA-mp7w-mhcv-673j), CC-BY-4.0, modified 2025-02-14
- NVD: [CVE-2025-25304](https://nvd.nist.gov/vuln/detail/CVE-2025-25304), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-25304 · Whole record: https://cve.day/CVE-2025-25304.json · Rebuilt by cve.day 2026-11-25T22:58:54.118Z
