# CVE-2023-26487: Vega cross-site scripting in lassoAppend function

Source: https://junglewise.ai/threats/cve-2023-26487-vega-cross-site-scripting-in-lassoappend-function  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2023-03-02. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2023-26487 · Severity: low · CVSS 3.1 · Published 2023-03-02

Vega is a popular visualization grammar library used to create interactive data visualizations in web applications. The lassoAppend function, which handles selection interactions on visualizations, fails to validate input types, allowing attackers to inject arbitrary JavaScript code that executes in the context of the page viewing the visualization. This could allow stealing sensitive data, session tokens, or performing unauthorized actions on behalf of users.

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

## Quick answers

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

**How severe is CVE-2023-26487?** Low severity, with a CVSS score of 3.1, published 2 March 2023.

**Which products and versions are affected?** vega (npm) SEMVER:introduced=0,fixed=5.23.0; vega-functions (npm) SEMVER:introduced=0,fixed=5.13.1.

**Is there a fix for CVE-2023-26487?** Yes. vega (npm): upgrade to 5.23.0 or later; vega-functions (npm): upgrade to 5.13.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2023-26487 attacked?** It is attacked over the network.

**Am I affected by CVE-2023-26487?** Check whether you run vega (npm) or vega-functions (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.23.0 or later

  ```sh
  npm install vega@5.23.0
  ```

- vega-functions (npm): upgrade to 5.13.1 or later

  ```sh
  npm install vega-functions@5.13.1
  ```


## Technical details

The vulnerability is a cross-site scripting (XSS) flaw in Vega's lassoAppend function (CWE-79). The function accepts three arguments but does not validate that the first argument is actually an array; it merely calls the push method on whatever object is passed in. An attacker can pass any object with a push property set to any function accessible via event.view (such as setImmediate, console.log, or alert), which is then invoked with attacker-controlled arguments. The attack is triggered via a malicious Vega specification that uses mouse events to invoke lassoAppend with a crafted first argument. No authentication is required; the vulnerability is exploitable if a user opens a page or embeds a visualization containing the malicious Vega JSON. Patches are available in vega v5.23.0 and vega-functions v5.13.1.

## Affected products

- Vega Vega before 5.23.0
- Vega vega-functions before 5.13.1

## Identifiers

- CVE-2023-26487
- GHSA-w5m3-xh75-mp55

## Timeline

- 2023-03-02: disclosed: Advisory published
- 2023-03-02: patched: Vega v5.23.0 and vega-functions v5.13.1 released

## References

- [https://github.com/vega/vega/security/advisories/GHSA-w5m3-xh75-mp55](https://github.com/vega/vega/security/advisories/GHSA-w5m3-xh75-mp55)

## Related threats

- [Vega vega-functions cross-site scripting in setdata function](https://junglewise.ai/threats/cve-2025-66648-vega-vega-functions-cross-site-scripting-in-setdata-function)
- [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)
