-
Notifications
You must be signed in to change notification settings - Fork 4
fix(deps): update dependency vega to v6 [security] #205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/npm-vega-vulnerability
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify ESM-only compatibility with bundler and webview runtime.
Vega v6 is ESM-only (breaking change). Your webview bundle, runtime, and build tooling must support ESM. Inspect:
build/esbuild/build.ts,webpack.config.js, etc.)src/webviews/webview-side/vegaRenderer/vegaRenderer.js)If your runtime or bundler does not support ESM, follow the security advisory's guidance for non-ESM environments.
🏁 Script executed:
Length of output: 233
🏁 Script executed:
Length of output: 25316
🏁 Script executed:
Length of output: 0
🏁 Script executed:
Length of output: 106
🌐 Web query:
💡 Result:
Short answer: Vega v6 is ESM-only (since v6.0.0), so code that expects a CommonJS/require() build will break. Use one of these options:
References: Vega v6 release notes (ESM-only). [1] Node ESM interoperability / dynamic import docs. [2]
Sources:
[1] Vega v6.0.0 release notes.
[2] Node.js ECMAScript Modules documentation (import() interoperability).
Length of output: 2675
🏁 Script executed:
Length of output: 255
🏁 Script executed:
Length of output: 1235
🏁 Script executed:
Length of output: 641
🏁 Script executed:
Length of output: 662
Length of output: 222
🏁 Script executed:
Length of output: 1033
🏁 Script executed:
Length of output: 0
🏁 Script executed:
Length of output: 2022
Length of output: 343
🏁 Script executed:
Length of output: 1114
🏁 Script executed:
Length of output: 982
Vega v6 ESM-only concern applies specifically to extension code, not webview.
Vega v6 is ESM-only, and verification reveals this affects your extension runtime:
Webview (safe):
src/webviews/webview-side/vega-renderer/builds withtarget: 'web'→ ESM output in browser environment. No issue.Extension (at risk):
src/notebooks/deepnote/deepnoteDataConverter.tsimportsvega-litebut esbuild bundles it withformat: 'cjs'andtarget: 'node18'. ESM-only vega-lite bundled for CommonJS Node.js may fail at runtime.Action needed: Verify esbuild can transpile ESM vega-lite to CJS or add vega/vega-lite to externals with runtime fallback. Check that Node.js 18+ in your extension host supports the bundled output format.
🤖 Prompt for AI Agents
🧩 Analysis chain
Pin Vega to v6.2.0; version constraint allows unpatched releases.
CVE-2025-59840 is patched in Vega 6.2.0 and later. The constraint
^6.0.0permits 6.0.x–6.1.x (unpatched). Change to^6.2.0(or>=6.2.0) to ensure the security fix is applied.Additionally, per the security advisory, update related transitive/peer dependencies:
vega-expression→^6.1.0(or^5.2.1for non-ESM consumers)vega-interpreter→^2.2.1Verify these are already satisfied or add them to dependencies as needed.
🏁 Script executed:
Length of output: 101
🌐 Web query:
💡 Result:
Summary — CVE-2025-59840
What it is: a high‑severity DOM XSS / arbitrary JavaScript execution in Vega (visualization grammar) when an app both (a) attaches the vega library and a vega.View instance to the global window and (b) accepts user‑supplied Vega JSON definitions. It can be triggered even when the “safe mode” expression interpreter is used. Published Nov 13, 2025. [1][2][3]
Affected versions: vega < 6.2.0; certain vega-expression and vega-interpreter version ranges noted in advisories. [1][2]
Impact: attacker-supplied Vega specs can execute arbitrary JavaScript in victims’ browsers (DOM XSS) under the conditions above; severe (CVSSv3 ~8.x). [1][2]
Remediation / mitigation
References
🏁 Script executed:
Length of output: 299
🏁 Script executed:
Length of output: 897
Upgrade vega to ^6.2.0 and verify transitive dependencies.
CVE-2025-59840 is a high-severity DOM XSS in Vega versions before 6.2.0. Your current constraint
^6.0.0permits vulnerable 6.0.x–6.1.x releases. Change to^6.2.0.Vega 6.2.0 declares vega-expression ~6.1.0 as a dependency, which satisfies the advisory. Verify vega-interpreter also resolves to 2.2.1+ per the advisory recommendations.
package.json, line 2544:
"vega": "^6.0.0"→"vega": "^6.2.0"