Description
Origin Validation Error vulnerability in livebook-dev livebook allows untrusted notebook output JavaScript to trigger session-wide keyboard shortcuts, including forced evaluation of all cells and runtime restart.

Livebook's JS-view feature renders notebook-defined JavaScript inside a sandboxed, cross-origin iframe specifically because that JavaScript is untrusted. The trusted iframe shell in iframe/priv/static/iframe/v5.html forwards every keydown event fired in its own window to the parent page without consulting Event.isTrusted, so an event synthesized by the untrusted script through window.dispatchEvent is forwarded exactly as a genuine keystroke would be. The parent-side relay in assets/js/hooks/js_view.js reconstructs and re-dispatches it on the live page with no further validation, and because assets/js/hooks/session.js registers the global shortcut handler on the document in the capture phase, that handler acts on the replicated event regardless of how it was produced.

Sandboxed output JavaScript can therefore drive Livebook's session-wide keyboard shortcuts. Two of them reach LivebookWeb.SessionLive and execute immediately with no confirmation: the shortcut for queueing full evaluation runs every cell in the notebook, and the shortcut for reconnecting the runtime disconnects and reconnects it, discarding in-memory state. A third shortcut deletes the focused cell behind a confirmation dialog that the user can permanently dismiss, after which it too executes silently.

Forced full evaluation is the significant consequence, because it causes the notebook's own Elixir code to run without the user choosing to evaluate anything. A user who merely opens a notebook obtained from a third party, or reached from published documentation, can have its code executed on their runtime. Livebook also mirrors cell outputs to every connected client, so a malicious output triggers in a collaborator's browser as soon as it renders.

This issue affects livebook: from 0.5.0 before 0.18.7 and from 0.19.0 before 0.19.9.
Published: 2026-08-05
Score: 8.6 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

This vulnerability arises from an origin validation error in Livebook's JS-view sandbox, where JavaScript defined by an untrusted notebook is rendered in a sandboxed iframe that forwards all keydown events to its parent without checking their trustworthiness. A malicious script can synthesize key events that are then forwarded and re-dispatched by the host page, allowing the notebook to trigger session‑wide keyboard shortcuts that run without user confirmation. The consequences are severe: forced evaluation of all notebook cells, abrupt runtime restarts, and loss of in‑memory state, effectively enabling arbitrary Elixir code execution on the user’s environment.

Affected Systems

The affected product is Livebook by livebook-dev. Versions from 0.5.0 up to and including 0.18.6, and from 0.19.0 up to and including 0.19.8, are vulnerable. Any install later than 0.18.7 or 0.19.9, respectively, is considered safe.

Risk and Exploitability

The CVSS score is 8.6, indicating high severity. Exploitation requires the ability to supply untrusted JavaScript within a notebook, which an attacker can achieve by hosting or sharing a crafted notebook file. Once the notebook is opened, the malicious code runs locally, bypassing all trust checks to trigger global shortcuts such as full evaluation, runtime reconnection, or cell deletion without user interaction. The EPSS score is not available and this issue is not listed in the CISA KEV catalog, but the lack of confirmation requirements makes it a practical risk.

Generated by OpenCVE AI on August 5, 2026 at 21:38 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Livebook to 0.19.9 or a newer release that contains the patch.
  • If an upgrade cannot be applied immediately, patch the file assets/js/hooks/js_view.js by adding a check on event.isTrusted before forwarding or re‑dispatching keyboard events to the parent page.
  • Avoid opening notebooks from untrusted sources and review notebook content before execution.

Generated by OpenCVE AI on August 5, 2026 at 21:38 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 05 Aug 2026 20:15:00 +0000

Type Values Removed Values Added
Description Origin Validation Error vulnerability in livebook-dev livebook allows untrusted notebook output JavaScript to trigger session-wide keyboard shortcuts, including forced evaluation of all cells and runtime restart. Livebook's JS-view feature renders notebook-defined JavaScript inside a sandboxed, cross-origin iframe specifically because that JavaScript is untrusted. The trusted iframe shell in iframe/priv/static/iframe/v5.html forwards every keydown event fired in its own window to the parent page without consulting Event.isTrusted, so an event synthesized by the untrusted script through window.dispatchEvent is forwarded exactly as a genuine keystroke would be. The parent-side relay in assets/js/hooks/js_view.js reconstructs and re-dispatches it on the live page with no further validation, and because assets/js/hooks/session.js registers the global shortcut handler on the document in the capture phase, that handler acts on the replicated event regardless of how it was produced. Sandboxed output JavaScript can therefore drive Livebook's session-wide keyboard shortcuts. Two of them reach LivebookWeb.SessionLive and execute immediately with no confirmation: the shortcut for queueing full evaluation runs every cell in the notebook, and the shortcut for reconnecting the runtime disconnects and reconnects it, discarding in-memory state. A third shortcut deletes the focused cell behind a confirmation dialog that the user can permanently dismiss, after which it too executes silently. Forced full evaluation is the significant consequence, because it causes the notebook's own Elixir code to run without the user choosing to evaluate anything. A user who merely opens a notebook obtained from a third party, or reached from published documentation, can have its code executed on their runtime. Livebook also mirrors cell outputs to every connected client, so a malicious output triggers in a collaborator's browser as soon as it renders. This issue affects livebook: from 0.5.0 before 0.18.7 and from 0.19.0 before 0.19.9.
Title JS-view sandboxed output can synthesize keyboard events to trigger unconfirmed global shortcuts
First Time appeared Livebook-dev
Livebook-dev livebook
Weaknesses CWE-346
CPEs cpe:2.3:a:livebook-dev:livebook:*:*:*:*:*:*:*:*
Vendors & Products Livebook-dev
Livebook-dev livebook
References
Metrics cvssV4_0

{'score': 8.6, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


Subscriptions

Livebook-dev Livebook
cve-icon MITRE

Status: PUBLISHED

Assigner: EEF

Published:

Updated: 2026-08-05T19:44:11.831Z

Reserved: 2026-07-24T14:10:01.114Z

Link: CVE-2026-66298

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-05T21:45:04Z

Weaknesses