CVE-2026-66881: Path traversal in imported file_entries name allows arbitrary file write via URL-type entry download

Published Aug 5, 2026
·
Updated

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 fileentries metadata, each entry carrying a name. Every path that creates a file entry through the user interface validates that name with Livebook.Notebook.validatefileentryname/2, which requires a flat filename of alphanumerics, dashes, underscores and dots, ending in an extension. The import path does not: Livebook.LiveMarkdown.Import.fileentrymetadatatoattrs/1 in lib/livebook/livemarkdown/import.ex takes the name verbatim from the notebook source.

For a URL-type file entry, Livebook.Session.fileentrycachefile/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.resolveunixlikepath/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.toattachmentfileentry/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.

Other sources

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 fileentries metadata, each entry carrying a name. Every path that creates a file entry through the user interface validates that name with Livebook.Notebook.validatefileentryname/2, which requires a flat filename of alphanumerics, dashes, underscores and dots, ending in an extension. The import path does not: Livebook.LiveMarkdown.Import.fileentrymetadatatoattrs/1 in lib/livebook/livemarkdown/import.ex takes the name verbatim from the notebook source.

For a URL-type file entry, Livebook.Session.fileentrycachefile/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.resolveunixlikepath/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.toattachmentfileentry/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

Affected Software

5 affected componentsFixes available
livebook-dev livebook>=0.11.0<0.18.7, >=0.19.0<0.19.9
Livebook Livebook>=0.11.0<0.18.7
Livebook Livebook>=0.19.0<0.19.9
erlang/livebook>=0.11.0<0.18.7
0.18.7
erlang/livebook>=0.19.0<0.19.9
0.19.9

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade erlang/livebook to a version that resolves this vulnerability.

    Fixed in 0.18.7
  2. Upgrade

    Upgrade erlang/livebook to a version that resolves this vulnerability.

    Fixed in 0.19.9
  3. Upgrade

    Upgrade livebook to a version that resolves this vulnerability.

    Fixed in 0.18.7
  4. Upgrade

    Upgrade livebook to a version that resolves this vulnerability.

    Fixed in 0.19.9

Event History

Aug 5, 2026
CVE Published
via MITRE·07:43 PM
Data Sourced
via MITRE·07:43 PM
DescriptionWeakness
Data Sourced
via OSV·07:43 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via NVD·08:17 PM
RemedyDescriptionSeverityWeaknessAffected Software
Aug 6, 2026
Exploit Published
via CISA·01:03 PM

Frequently Asked Questions

1

What is the severity of CVE-2026-66881?

CVE-2026-66881 has a risk rating of 71, indicating a high severity level.

2

What type of vulnerability is CVE-2026-66881?

CVE-2026-66881 is classified as a Path Traversal vulnerability.

3

How can CVE-2026-66881 be exploited?

CVE-2026-66881 can be exploited by manipulating the name in imported file entries to write files to arbitrary paths.

4

How do I mitigate CVE-2026-66881?

To mitigate CVE-2026-66881, ensure that imported file entry names are validated and sanitized to prevent path traversal.

5

Who is affected by CVE-2026-66881?

CVE-2026-66881 affects users of the livebook-dev livebook application that allows importing notebooks with file entries.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203