ZeroHour

CVE-2026-66881

PoC niche

Arbitrary file write via relative path traversal in Livebook notebook import

CVSS 4.0
7.0 high
EPSS
<1%p35
Published
()
Modified
AI analysis

Livebook versions 0.11.0 through 0.18.6 and 0.19.0 through 0.19.8 are vulnerable to a relative path traversal (CWE-23): when importing a .livemd notebook, the markdown importer takes each URL-type file entry's declared name verbatim, skipping the flat-filename validation applied elsewhere, so the name can contain '/' and '..' sequences. When the opened notebook later requests that entry's content, Livebook resolves the name beneath the session's temporary directory without a containment check, downloads the entry's URL, and writes the response body to the resolved path while creating parent directories as needed, giving the attacker control of both the destination and the contents of the file. A victim only needs to open an attacker-supplied notebook and trigger the fetch within their own authenticated session; no attacker account is required, and because URL-type entries bypass notebook stamping quarantine on import no warning is shown, allowing creation or overwriting of files anywhere the Livebook process can write (CVSS 4.0: 7.0 High, high integrity impact). No in-the-wild exploitation is known; the flaw is documented in a public GitHub advisory (GHSA-r4h8-2xpq-v48g), has a modest EPSS of 0.4%, and is fixed in 0.18.7 and 0.19.9.

What to do: Upgrade to Livebook 0.18.7 (0.18 line) or 0.19.9 or later. Until patched, do not open .livemd notebooks from untrusted sources, and audit already-imported notebooks' file_entries metadata for names containing '/' or '..' whose fetch could have written files outside the session directory. Exploitation requires user interaction and no in-the-wild activity is reported, so patching at normal cadence is reasonable; also review which paths the Livebook process can write to.

Affected
livebook-dev livebook>= 0.11.0, < 0.18.7 (fixed in 0.18.7)
livebook-dev livebook>= 0.19.0, < 0.19.9 (fixed in 0.19.9)
Estimated exposure
nichelikely in the low thousands of active deployments at most (specialist Elixir-ecosystem notebook tool run as desktop apps, containers, or embedded in Elixir… — No public active-install counts or internet-exposure scan figures exist for Livebook, so this is an order-of-magnitude estimate from its adoption as a specialist notebook server used mainly by the relatively small Elixir community,…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

Relative Path Traversal vulnerability in livebook-dev livebook allows an attacker-authored notebook to write a file with attacker-controlled content to an arbitrary path. A .livemd notebook can declare file_entries metadata, each entry carrying a name. Every path that creates a file entry through the user interface validates that name with Livebook.Notebook.validate_file_entry_name/2, which requires a flat filename of alphanumerics, dashes, underscores and dots, ending in an extension. The import path does not: Livebook.LiveMarkdown.Import.file_entry_metadata_to_attrs/1 in lib/livebook/live_markdown/import.ex takes the name verbatim from the notebook source. For a URL-type file entry, Livebook.Session.file_entry_cache_file/2 in lib/livebook/session.ex resolves that name beneath the session's temporary directory without checking that the result stays inside it, and Livebook.FileSystem.Utils.resolve_unix_like_path/2 collapses parent-directory segments while clamping only at the filesystem root. When the entry's content is requested and no cached copy exists, Livebook fetches the entry's URL and writes the response body to the resolved path, creating parent directories as needed. The attacker therefore controls both the destination and the contents of the written file, which may land anywhere the Livebook process can write. The same missing containment check is present in Livebook.Session.to_attachment_file_entry/2. A victim who opens an attacker-supplied notebook and causes the entry to be fetched triggers the write within their own authenticated session; the attacker needs no account on the target instance. URL-type entries are also not placed under notebook stamping quarantine on import, so no warning is shown. This issue affects livebook: from 0.11.0 before 0.18.7 and from 0.19.0 before 0.19.9.

Vendors
livebook
Products
livebook
Weakness
CWE-23
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

No ingested article mentions this CVE yet.