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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.5
- **CVSS:** 6.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: Low; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.77% (percentile 52, 2026-11-26)
- **CWE:** CWE-79
- **Aliases:** GHSA-4vq7-882g-wcg4
- **Published:** 2023-03-02T23:11:05.000Z
- **Modified:** 2026-09-10T03:49:52.396Z

## Who should check

- Projects that depend on npm package vega-functions (\< 5.13.1)
- Projects that depend on npm package vega (\< 5.23.0)
- Anyone running vega \< 5.13.1

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

## Affected and fixed versions

- npm `vega-functions`: affected \< 5.13.1; fixed 5.13.1 (osv)
- npm `vega`: affected \< 5.23.0; fixed 5.23.0 (osv)
- vega: \< 5.13.1 (cvelist)

## Mitigation

- Upgrade vega-functions to 5.13.1 or later.
- Upgrade vega to 5.23.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-26486. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-26486.md
Affected: vega-functions < 5.13.1; vega < 5.23.0
Fixed in: 5.13.1, 5.23.0

Steps:
1. Search this machine and project for vega-functions (npm), vega (npm), vega: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-26486 being exploited?

There is no confirmed exploitation: CVE-2023-26486 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 0.77% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-26486?

Medium: CVSS 6.5 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2023-26486?

vega-functions \< 5.13.1; vega \< 5.23.0.

### Is there a fix for CVE-2023-26486?

Yes. Fixed in 5.13.1, 5.23.0. Upgrade vega-functions to 5.13.1 or later. Upgrade vega to 5.23.0 or later.

### How do I check if I'm affected by CVE-2023-26486?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/vega/vega/security/advisories/GHSA-4vq7-882g-wcg4>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2023-26486>
- exploit: <https://vega.github.io/editor/#/url/vega/N4IgJAzgxgFgpgWwIYgFwhgF0wBwqgegIDc4BzJAOjIEtMYBXAI0poHsDp5kTykSArJQBWENgDsQAGhAATJJhSoA2qHFIEcNCAAaAZT0ACAApsAwtJDEkAGwZwIaZQEYAujMwAnJOIgAzNk8EJ1BMAE8cLXQAoIYbFBkkR3QNNgZxTEs4AA8cT21oWzgACgByP3SoUqlDcTibGsNgKAlMHMxUJsKbB07gCvEoPus7OE7ukvLK6sNSuBHihTYmYoAdEABNAHVsmyhxAEU2AFk9AGsAdnWASmuZ5tb2von8JoGhppH7TuVXShbfF4GFBMIF-hIIECQYEAL5wmHXeEIkAw1yomFAA>
- other: <https://github.com/vega/vega/releases/tag/v5.23.0>
- other: <https://github.dev/vega/vega/blob/72b9b3bbf912212e7879b6acaccc84aff969ef1c/packages/vega-functions/src/functions/scale.js#L36-L37>
- other: <https://github.dev/vega/vega/blob/72b9b3bbf912212e7879b6acaccc84aff969ef1c/packages/vega-functions/src/scales.js#L6>
- other: <https://github.com/vega/vega>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-26486>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-4vq7-882g-wcg4> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-26486> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-26486>
