CVE-2023-26486 Vega `scale` expression function cross site scripting

Medium 6.5 Published Updated

Attackers can execute arbitrary JavaScript by exploiting the Vega scale expression function to escape the sandbox, affecting applications using this visualization library.

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-26486?

CVE-2023-26486 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. The Vega `scale` expression function has the ability to call arbitrary functions with a single controlled argument. The scale expression function passes a user supplied argument group to getScale, which is then used as if it were an internal context. The context.scales[name].value is accessed from group and called as a function back in scale. This can be exploited to escape the Vega expression sandbox in order to execute arbitrary JavaScript. This issue has been fixed in version 5.13.1.

Weakness: CWE-79

Which versions are affected by CVE-2023-26486?

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-26486?

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-26486 being exploited?

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

Sources

Also known as DEBIAN-CVE-2023-26486, GHSA-4vq7-882g-wcg4.

Is CVE-2023-26486 in your software?

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

Check your SBOMs for free