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

Medium 6.5 Published Updated

Attackers can execute arbitrary JavaScript via the lassoAppend function due to missing type checks, potentially leading to code execution in vulnerable environments.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-26487?

CVE-2023-26487 is a medium-severity cross-site scripting vulnerability in vega, published on 3 Mar 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-79

Which versions are affected by CVE-2023-26487?

4 open source packages ship an affected version, including vega and vega-functions. It affects 2 products.

PackageAffectedFixed in
vega npmAll versions5.23.0
vega npmAll versions5.23.0
vega-functions npmAll versions5.13.1
vega-functions npmAll versions5.13.1

Products include Vega-Functions Project Vega-Functions, Vega Project Vega.

How do I fix CVE-2023-26487?

Upgrade vega to 5.23.0 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2023-26487 being exploited?

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

Sources

Also known as DEBIAN-CVE-2023-26487, GHSA-w5m3-xh75-mp55.

Is CVE-2023-26487 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free