Cross-Site Scripting (XSS) in vega
Summary
Cross-site scripting in vega (CVE-2025-59840). Confidential information can be exposed externally. Exploitable via vega. Mitigation: upgrade to 6.2.0 or later.
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
A vulnerability tracked as CVE-2025-59840 has been found in vega.
Attackers can target a specific entry point like vega over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 8.1/10.
What to do: upgrade vega to 6.2.0 or later.
If unsure, ask your IT team or search "vega CVE-2025-59840" on the vendor's site.
CVE-2025-59840 (vega) — CWE-79 / CVSS v3 8.1
Attack vector: remote (network-reachable) / unauthenticated
Attack surface: vega / vega.View / window / JSON
Patched: 6.2.0 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Cross-site scripting (XSS) (CWE-79) exists in vega. Attackers reach the vulnerable code path via vega without authentication.
Check the vendor advisory for the affected versions of vega. Attack surface: vega / vega.View / window / JSON.
Severity: High (CVSS 8.1/10). Confidential information can be exposed externally.
Update to 6.2.0.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'vega' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1
Identify exposureidentify
grep -r 'vega' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
vegaを grep し、稼働しているサービス・バージョンを把握する。 -
2
Apply patchpatch
Upgrade vega to 6.2.0ステージング環境で 6.2.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3
Post-deployment verificationverify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| npmvega |
< 6.2.0→ 6.2.0 |
6.2.0 |
| npmvega-expression |
< 5.2.1→ 5.2.1 |
5.2.1 |
| npmvega-interpreter |
< 1.2.1→ 1.2.1 |
1.2.1 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- Debian DEBIAN-CVE-2025-59840 vega.js Fix available
- Ubuntu UBUNTU-CVE-2025-59840 vega.js No fixed version in this record
Original description The description as published by the source.
Vega is a visualization grammar, a declarative format for creating, saving, and sharing interactive visualization designs. In Vega prior to version 6.2.0, applications meeting 2 conditions are at risk of arbitrary JavaScript code execution, even if "safe mode" expressionInterpreter is used. They are vulnerable if they use vega in an application that attaches vega library and a vega.View instance similar to the Vega Editor to the global window and if they allow user-defined Vega JSON definitions (vs JSON that was is only provided through source code). Patches are available in the following Vega applications. If using the latest Vega line (6.x), upgrade to vega 6.2.0 / vega-expression 6.1.0 / vega-interpreter 2.2.1 (if using AST evaluator mode). If using Vega in a non-ESM environment, upgrade to vega-expression 5.2.1 / 1.2.1 (if using AST evaluator mode). Some workarounds are available. Do not attach vega View instances to global variables, and do not attach vega to the global window. These practices of attaching the vega library and View instances may be convenient for debugging, but should not be used in production or in any situation where vega/vega-lite definitions could be provided by untrusted parties.
Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
References
- advisory github.com
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- web github.com
- web github.com
- web vega.github.io
- web vega.github.io