7.0high
Path traversal in imported file_entries name allows arbitrary file write via URL-type entry download
- Severity
- 7.0high CVSS:4.0 by EEF
- Exploit likelihood
- 0.53% (higher than 46% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- EEF
- Also known as
- EEF-CVE-2026-66881GHSA-r4h8-2xpq-v48g
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| livebook | from 0.11.0 before 0.18.7, from 0.19.0 before 0.19.9 | CVE List |
| livebook-dev/livebook | from 0.11.0 before 0.18.7, from 0.11.0-cuda12 before 0.18.7-cuda12, from 0.19.0 before 0.19.9, from 0.19.0-cuda12 before 0.19.9-cuda12, from c02eb984f80a543c7a52b1d882c76f56aa5be743 before * | CVE List |
| livebook (Hex) | from 0.11.0 before 0.18.7, from 0.19.0 before 0.19.9 | Erlang Ecosystem Foundation |
| https://github.com/livebook-dev/livebook | from c02eb984f80a543c7a52b1d882c76f56aa5be743 before 1443dd23df6e7b9203b6797f0695a807aeb81dde, before 50f86982ebf36c22abeb379b55ec0f2859c83bb9, before acf4cb8c0c79b89c795b180f061be7de2d8b5aa9 | Erlang Ecosystem Foundation |
| livebook livebook | from 0.11.0 before 0.18.7, from 0.19.0 before 0.19.9 | NVD |
All scores
| EEF | 7.0high CVSS:4.0 | 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 |
| Erlang Ecosystem Foundation | Not scored CVSS:4.0 | 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 |
| NVD | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
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.
Erlang Ecosystem Foundation
Summary
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.
NVD (es)
Una vulnerabilidad de salto de ruta relativo en livebook-dev livebook permite que un cuaderno creado por un atacante escriba un archivo con contenido controlado por el atacante en una ruta arbitraria. Un cuaderno .livemd puede declarar metadatos de file_entries, cada entrada con un nombre. Cada ruta que crea una entrada de archivo a través de la interfaz de usuario valida ese nombre con Livebook.Notebook.validate_file_entry_name/2, que requiere un nombre de archivo plano de caracteres alfanuméricos, guiones, guiones bajos y puntos, que termina en una extensión. La ruta de importación no lo hace: Livebook.LiveMarkdown.Import.file_entry_metadata_to_attrs/1 en lib/livebook/live_markdown/import.ex toma el nombre textualmente del código fuente del cuaderno. Para una entrada de archivo de tipo URL, Livebook.Session.file_entry_cache_file/2 en lib/livebook/session.ex resuelve ese nombre debajo del directorio temporal de la sesión sin verificar que el resultado permanezca dentro de él, y Livebook.FileSystem.Utils.resolve_unix_like_path/2 colapsa los segmentos de directorio padre mientras se limita solo a la raíz del sistema de archivos. Cuando se solicita el contenido de la entrada y no existe una copia en caché, Livebook obtiene la URL de la entrada y escribe el cuerpo de la respuesta en la ruta resuelta, creando directorios padre según sea necesario. El atacante, por lo tanto, controla tanto el destino como el contenido del archivo escrito, que puede terminar en cualquier lugar donde el proceso de Livebook pueda escribir. La misma verificación de contención faltante está presente en Livebook.Session.to_attachment_file_entry/2. Una víctima que abre un cuaderno proporcionado por un atacante y hace que se obtenga la entrada activa la escritura dentro de su propia sesión autenticada; el atacante no necesita una cuenta en la instancia de destino. Las entradas de tipo URL tampoco se colocan bajo cuarentena de sellado de cuadernos al importar, por lo que no se muestra ninguna advertencia. Este problema afecta a livebook: desde 0.11.0 antes de 0.18.7 y desde 0.19.0 antes de 0.19.9.
References
| https://github.com/livebook-dev/livebook/security/advisories/GHSA-r4h8-2xpq-v48g | advisory, exploit, patch, related, vendor-advisory | |
| https://cna.erlef.org/cves/CVE-2026-66881.html | related, vendor-advisory, web | |
| https://osv.dev/vulnerability/EEF-CVE-2026-66881 | related, third-party-advisory | |
| https://github.com/livebook-dev/livebook/commit/c02eb984f80a543c7a52b1d882c76f56aa5be743 | related, web | |
| https://github.com/livebook-dev/livebook/commit/1443dd23df6e7b9203b6797f0695a807aeb81dde | fix, patch | |
| https://github.com/livebook-dev/livebook/commit/50f86982ebf36c22abeb379b55ec0f2859c83bb9 | fix, patch | |
| https://github.com/livebook-dev/livebook/commit/acf4cb8c0c79b89c795b180f061be7de2d8b5aa9 | fix, patch | |
| https://hex.pm/packages/livebook | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-66881 changed 2026-11-20 | CVE Terms of Use |
| Erlang Ecosystem Foundation | EEF-CVE-2026-66881 changed 2026-11-25 | CC-BY-4.0 |
| NVD | CVE-2026-66881 changed 2026-11-20 | Public domain |