# CVE-2026-66298: JS-view sandboxed output can synthesize keyboard events to trigger unconfirmed global shortcuts

> Untrusted JavaScript in Livebook notebooks can synthesize keyboard events to force code execution or restart runtimes without user confirmation.

- **Severity:** High 8.6 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 5 Aug 2026
- **Updated:** 6 Aug 2026
- **Also known as:** EEF-CVE-2026-66298, GHSA-68c2-prqg-x62g

## What is CVE-2026-66298?

CVE-2026-66298 is a high-severity vulnerability in livebook-dev livebook, published on 5 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

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

Weakness: CWE-346 (Origin Validation Error)

## Which versions are affected by CVE-2026-66298?

1 open source package ship an affected version, including livebook. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `livebook` | Hex | From 0.5.0 | 0.18.7, 0.19.9 |

Products: Livebook Livebook.

## How do I fix CVE-2026-66298?

Upgrade livebook to a fixed version for your release line: 0.18.7 or 0.19.9.

## Is CVE-2026-66298 being exploited?

There is no known exploitation of CVE-2026-66298 in the wild and no public exploit code.

## Other vulnerabilities in livebook-dev livebook

- [CVE-2023-35174](https://insights.sbomify.com/CVE-2023-35174/): Livebook Desktop's protocol handler can be exploited to execute arbitrary command on Windows (high 8.6)
- [CVE-2026-68746](https://insights.sbomify.com/CVE-2026-68746/): Livebook Teams identity check fails open when the deployment group is unresolvable, allowing unauthenticated access (high 7.7)
- [CVE-2026-66881](https://insights.sbomify.com/CVE-2026-66881/): Path traversal in imported file_entries name allows arbitrary file write via URL-type entry download (high 7.0)
- [CVE-2026-66885](https://insights.sbomify.com/CVE-2026-66885/): Livebook Teams identity callback lacks state binding, allowing login CSRF (medium 6.8)
- [CVE-2026-66297](https://insights.sbomify.com/CVE-2026-66297/): Unescaped deployment environment variables in generated setup commands (medium 5.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-66298 and fix it if it is affected.

What it is: CVE-2026-66298 is a high-severity vulnerability in livebook-dev livebook, published on 5 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-66298 in the wild and no public exploit code.

Affected packages and fixed versions:
- livebook (Hex): affected from 0.5.0; fixed in 0.18.7, 0.19.9

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-66298/ (Markdown: https://insights.sbomify.com/CVE-2026-66298/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-66298
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-66298
- OSV: https://osv.dev/vulnerability/CVE-2026-66298

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-66298/
Summaries are generated and may contain mistakes; the official description above is the record.
