Feb 28, 2026·5 min read·50 visits
CVE-2025-66648 is a High-severity XSS vulnerability in Vega versions prior to 6.1.1. Attackers can execute arbitrary JavaScript by injecting a malicious signal handler that traverses the `event` object to access the global `window` context. This affects applications rendering untrusted Vega specifications.
A critical vulnerability exists in the `vega-functions` package, a core dependency of the Vega visualization grammar. The flaw permits attackers to escape the expression sandbox by leveraging object context leakage within signal handlers. Specifically, the `setdata` function (which utilizes the internal `modify` method) allows the execution of arbitrary JavaScript functions found via property traversal on the `event` object. This bypasses standard expression interpretation safeguards, including the 'CSP-safe' interpreter, enabling Cross-Site Scripting (XSS) when rendering user-supplied visualization specifications.
The Vega visualization grammar allows users to define interactive visualizations using a JSON specification. To support interactivity, Vega includes an expression language that evaluates logic within signal handlers. While Vega implements an expression interpreter to restrict execution to a safe subset of JavaScript, CVE-2025-66648 reveals a bypass in this sandbox mechanism located within the vega-functions component.
The vulnerability manifests in the setdata expression function, which is designed to modify data tuples dynamically. The flaw allows an attacker to manipulate the test predicate argument of the underlying modify function. By traversing properties available on the event object—specifically accessing the internal Dataflow graph and the DOM element—an attacker can reach the global window object. This effectively grants access to native browser APIs (e.g., fetch, alert) and enables arbitrary code execution in the context of the application rendering the chart.
The root cause is a combination of object context leakage and insufficient validation of function arguments within the internal modify() function. When a signal event triggers, Vega exposes an event object to the expression scope. This object inadvertently retains references to internal engine structures that should be opaque to the user.
Specifically, the event object links to the dataflow instance, which in turn holds a reference to the underlying DOM element (_el). From a DOM element, standard JavaScript property traversal allows access to ownerDocument and defaultView, effectively leaking the global window object. The modify(name, insert, remove, toggle, test, values) function failed to validate that its test argument was a safe, internal predicate. Instead, it accepted any function reference passed to it and executed that function against data tuples during the dataflow propagation cycle.
The vulnerability lies in how vega-functions handles arguments passed to the setdata (and underlying modify) function without scrutinizing the origin of the predicate function. Below is a conceptual representation of the vulnerable logic versus the patched approach.
The unpatched version allowed the test parameter to be any callable function derived from the expression scope, including those reachable via the prototype chain or object traversal.
// Conceptual vulnerable implementation in vega-functions
function modify(name, insert, remove, toggle, test, values) {
// ... lookup dataset by name ...
// The 'test' function is invoked directly without verifying it is safe
if (test && test(tuple)) {
// modify tuple
}
}The fix introduces strict validation to ensure arguments are expected types and blocks access to sensitive internal properties like _el on the dataflow object. The patch likely sanitizes the event object before exposing it to the expression scope or explicitly validates that the test function is a generated internal predicate rather than a user-supplied reference to window methods.
// Conceptual patched implementation
function modify(name, insert, remove, toggle, test, values) {
// Validation: Ensure 'test' is not a native function or external reference
if (test && !isInternalPredicate(test)) {
throw new Error("Illegal argument to setdata");
}
// Hardening: The 'event' object passed to expressions no longer exposes '_el'
// event.dataflow._el => undefined
}Exploitation requires the attacker to supply a malicious Vega JSON specification to a target application. The payload leverages a signal handler listening for standard user interaction events (like click or mouseover) to trigger the execution chain.
The attacker constructs a setdata call that walks the property chain from event to window. The payload demonstrates executing alert(), but a real-world attack would likely use fetch() to exfiltrate tokens or eval() (if CSP permits) to execute complex payloads.
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"signals": [
{
"name": "triggerXSS",
"on": [
{
"events": "click",
"update": "setdata('table', [], [], [], event.dataflow._el.ownerDocument.defaultView.alert('XSS'))"
}
]
}
],
"data": [
{ "name": "table", "values": [{"id": 1}] }
]
}> [!WARNING]
> CSP Safe Mode Bypass: This vulnerability bypasses vega.expressionInterpreter. Even if an application explicitly uses the interpreter to avoid eval() and adhere to Content Security Policy, this specific vector succeeds because it relies on existing function references (window.alert) rather than string-to-code compilation.
The impact of this vulnerability is high (CVSS 7.2) because it allows for Stored XSS or Reflected XSS depending on how the application loads Vega specifications.
Confidentiality: Attackers can read sensitive data from the DOM, including session cookies (if not HttpOnly), LocalStorage tokens, and CSRF tokens.
Integrity: Attackers can modify the visual content of the dashboard to mislead users or inject phishing forms overlaying the legitimate application interface.
Scope: This affects any system integrating Vega or Vega-Lite where users can save or share visualizations. Common targets include data science notebooks (Jupyter), business intelligence dashboards (Kibana), and wiki-style documentation systems integrating Vega rendering.
The only effective remediation is to upgrade the vulnerable dependencies.
vega-functions6.1.1vega (Fixed in 5.30.0 or equivalent depending on dependency tree resolution)Developers should verify their lockfiles (package-lock.json or yarn.lock) to ensure that transitive dependencies of vega are resolved to vega-functions version 6.1.1 or higher. No configuration changes or workarounds are available; the code itself must be patched to prevent the context leakage.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
vega-functions Vega Project | < 6.1.1 | 6.1.1 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-79 |
| Attack Vector | Network |
| CVSS v3.1 | 7.2 (High) |
| EPSS Score | 0.00045 |
| Exploit Maturity | Proof-of-Concept |
| Impact | Arbitrary Code Execution (Browser Context) |
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CVE-2022-0492 is a high-severity missing authorization vulnerability in the Linux kernel's Control Groups (cgroups) v1 implementation. The flaw resides within the cgroup_release_agent_write function in kernel/cgroup/cgroup-v1.c, where the kernel fails to validate if the process writing to the release_agent file possesses administrative capabilities in the initial user namespace. This allows a local attacker inside a container with root privileges (UID 0) to abuse user namespaces, mount a cgroups v1 directory, modify the release_agent parameter, and execute arbitrary commands on the host system as host root, effectively achieving a complete container escape.
NocoDB is subject to an insufficient session expiration vulnerability where OAuth access and refresh tokens are not invalidated or revoked during security-sensitive actions such as password changes, forgot-password requests, or password resets. This allows an attacker possessing an active OAuth token to maintain unauthorized persistence.
A vulnerability in the vantage6 federated learning framework allows unauthenticated remote attackers to gain administrative control of the server via hardcoded default credentials (root/root) when deployed under default configurations in versions 4.2.3 and below.
An improper access control vulnerability in the vantage6 node component allows concurrently running algorithm containers to read and modify sensitive input and output files of other tasks. The lack of strict workspace directory isolation exposes a significant attack surface in multi-tenant or federated environments where untrusted algorithms are executed.
TinyMCE versions 6.8.0 through 7.0.1 contain a high-severity Cross-Site Scripting (XSS) vulnerability. The flaw exists in the custom HTML parser and sanitizer module, which incorrectly manages SVG namespace scopes when parsing nested elements. A low-privileged or unauthenticated attacker can submit a crafted HTML payload containing nested SVG structures to bypass sanitization filters, leading to arbitrary JavaScript execution in the context of the victim's browser session.
CVE-2026-47759 is a critical stored Cross-Site Scripting (XSS) vulnerability affecting multiple active branches of the TinyMCE rich text editor. The flaw resides in the editor's handling of user-controlled, prefixed internal attributes, such as data-mce-href, data-mce-src, and data-mce-style. When processing raw HTML inputs, TinyMCE's internal validation schema neglects to inspect these custom prefixed attributes. During HTML serialization, the editor's engine extracts these unsanitized values and copies them back into standard executable attributes, overwriting any previously sanitized standard values and leading to execution of arbitrary code.