# CVE-2020-26296: Vega cross-site scripting in expressions

Source: https://junglewise.ai/threats/cve-2020-26296-vega-cross-site-scripting-in-expressions  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2020-12-30. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2020-26296 · Severity: low · CVSS 3.1 · Published 2020-12-30

Vega is a popular JavaScript library for creating interactive data visualizations. A cross-site scripting (XSS) vulnerability in Vega expressions allows an attacker to inject malicious code that executes in a victim's browser, potentially leading to theft of sensitive data or hijacking of user sessions.

Technologies: [vega (npm)](https://junglewise.ai/threats/technologies/vega). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2020-26296 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2020-26296 being exploited in the wild.

**How severe is CVE-2020-26296?** Low severity, with a CVSS score of 3.1, published 30 December 2020.

**Which products and versions are affected?** vega (npm) SEMVER:introduced=0,fixed=5.17.3.

**Is there a fix for CVE-2020-26296?** Yes. vega (npm): upgrade to 5.17.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2020-26296 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2020-26296?** Check whether you run vega (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- vega (npm): upgrade to 5.17.3 or later

  ```sh
  npm install vega@5.17.3
  ```


## Technical details

A cross-site scripting (CWE-79) vulnerability exists in Vega expression evaluation, where specially crafted expressions can execute arbitrary JavaScript in the victim's browser context. The vulnerability affects all versions prior to 5.17.3 and requires network access and user interaction (opening a malicious visualization) to exploit, but does not require authentication. An attacker can craft a malicious Vega specification that, when processed and rendered, executes arbitrary code with the privileges of the victim's session. The vulnerability is fixed in version 5.17.3.

## Affected products

- Vega Vega before 5.17.3

## Identifiers

- CVE-2020-26296
- GHSA-r2qc-w64x-6j54

## Timeline

- 2020-12-30: disclosed
- 2020-12-30: patched

## References

- [https://github.com/vega/vega/security/advisories/GHSA-r2qc-w64x-6j54](https://github.com/vega/vega/security/advisories/GHSA-r2qc-w64x-6j54)

## Related threats

- [Vega Cross-Site Scripting via toString in VEGA_DEBUG](https://junglewise.ai/threats/cve-2025-59840-vega-cross-site-scripting-via-tostring-in-vega-debug)
- [Vega cross-site scripting via RegExp.prototype[@@replace]](https://junglewise.ai/threats/cve-2025-27793-vega-cross-site-scripting-via-regexp-prototype-replace)
- [Vega Cross-Site Scripting via event filter in expression interpreter](https://junglewise.ai/threats/cve-2025-26619-vega-cross-site-scripting-via-event-filter-in-expression)
- [Vega cross-site scripting in vlSelectionTuples function](https://junglewise.ai/threats/cve-2025-25304-vega-cross-site-scripting-in-vlselectiontuples-function)
- [Vega arbitrary code execution via href links](https://junglewise.ai/threats/vega-arbitrary-code-execution-via-href-links-99e395dd)
