CVE-2025-27793 Vega vulnerable to Cross-site Scripting via RegExp.prototype[@@replace]

Medium 5.3 Published Updated

Attackers can execute arbitrary JavaScript via crafted Vega JSON definitions, impacting applications rendering untrusted visualizations.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2025-27793?

CVE-2025-27793 is a medium-severity cross-site scripting vulnerability in vega, published on 27 Mar 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Vega is a visualization grammar, a declarative format for creating, saving, and sharing interactive visualization designs. In Vega prior to version 5.32.0, corresponding to vega-functions prior to version 5.17.0, users running Vega/Vega-lite JSON definitions could run unexpected JavaScript code when drawing graphs, unless the library was used with the `vega-interpreter`. Vega version 5.32.0 and vega-functions version 5.17.0 fix the issue. As a workaround, use `vega` with expression interpreter.

Weakness: CWE-87, CWE-79

Which versions are affected by CVE-2025-27793?

4 open source packages ship an affected version, including vega and vega-functions.

PackageAffectedFixed in
vega npmAll versions5.32.0
vega npmAll versions5.32.0
vega-functions npmAll versions5.17.0
vega-functions npmAll versions5.17.0

How do I fix CVE-2025-27793?

Upgrade vega to 5.32.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-2025-27793 being exploited?

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

Sources

Also known as DEBIAN-CVE-2025-27793, GHSA-963h-3v39-3pqf, UBUNTU-CVE-2025-27793.

Is CVE-2025-27793 in your software?

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

Check your SBOMs for free