← Back to CVE Explorer

CVE-2026-66881

Full vulnerability record from the local CVENow database.

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.

Severity
HIGH
CVSS score
7.0 (v4.0)
Vulnerability status
Analyzed
Source identifier
6b3ad84c-e1a6-4bf7-a703-f496b71e49db
Published
2026-08-05 20:17:12.600000
Last modified
2026-10-24 16:10:00.153000
View original CVE JSON
{
  "id": "CVE-2026-66881",
  "sourceIdentifier": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
  "published": "2026-08-05T20:17:12.600",
  "lastModified": "2026-10-24T16:10:00.153",
  "vulnStatus": "Analyzed",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "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.\n\nA .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.\n\nFor 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.\n\nA 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.\n\nThis issue affects livebook: from 0.11.0 before 0.18.7 and from 0.19.0 before 0.19.9."
    },
    {
      "lang": "es",
      "value": "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.\n\nUn 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.\n\nPara 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.\n\nUna 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.\n\nEste problema afecta a livebook: desde 0.11.0 antes de 0.18.7 y desde 0.19.0 antes de 0.19.9."
    }
  ],
  "affected": [
    {
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
      "affectedData": [
        {
          "vendor": "livebook-dev",
          "product": "livebook",
          "defaultStatus": "unaffected",
          "collectionURL": "https://repo.hex.pm",
          "packageName": "livebook",
          "cpes": [
            "cpe:2.3:a:livebook-dev:livebook:*:*:*:*:*:*:*:*"
          ],
          "modules": [
            "Elixir.Livebook.LiveMarkdown.Import",
            "Elixir.Livebook.Session",
            "Elixir.Livebook.FileSystem.Utils"
          ],
          "programFiles": [
            "lib/livebook/live_markdown/import.ex",
            "lib/livebook/session.ex",
            "lib/livebook/file_system/utils.ex"
          ],
          "programRoutines": [
            {
              "name": "'Elixir.Livebook.LiveMarkdown.Import':file_entry_metadata_to_attrs/1"
            },
            {
              "name": "'Elixir.Livebook.Session':file_entry_cache_file/2"
            },
            {
              "name": "'Elixir.Livebook.Session':to_attachment_file_entry/2"
            },
            {
              "name": "'Elixir.Livebook.FileSystem.Utils':resolve_unix_like_path/2"
            }
          ],
          "repo": "https://github.com/livebook-dev/livebook",
          "packageURL": "pkg:hex/livebook",
          "versions": [
            {
              "version": "0.11.0",
              "lessThan": "0.18.7",
              "versionType": "semver",
              "status": "affected"
            },
            {
              "version": "0.19.0",
              "lessThan": "0.19.9",
              "versionType": "semver",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "livebook-dev",
          "product": "livebook",
          "defaultStatus": "unaffected",
          "collectionURL": "https://ghcr.io",
          "packageName": "livebook-dev/livebook",
          "cpes": [
            "cpe:2.3:a:livebook-dev:livebook:*:*:*:*:*:*:*:*"
          ],
          "modules": [
            "Elixir.Livebook.LiveMarkdown.Import",
            "Elixir.Livebook.Session",
            "Elixir.Livebook.FileSystem.Utils"
          ],
          "programFiles": [
            "lib/livebook/live_markdown/import.ex",
            "lib/livebook/session.ex",
            "lib/livebook/file_system/utils.ex"
          ],
          "programRoutines": [
            {
              "name": "'Elixir.Livebook.LiveMarkdown.Import':file_entry_metadata_to_attrs/1"
            },
            {
              "name": "'Elixir.Livebook.Session':file_entry_cache_file/2"
            },
            {
              "name": "'Elixir.Livebook.Session':to_attachment_file_entry/2"
            },
            {
              "name": "'Elixir.Livebook.FileSystem.Utils':resolve_unix_like_path/2"
            }
          ],
          "packageURL": "pkg:oci/livebook?repository_url=ghcr.io%2Flivebook-dev",
          "versions": [
            {
              "version": "0.11.0",
              "lessThan": "0.18.7",
              "versionType": "other",
              "status": "affected"
            },
            {
              "version": "0.19.0",
              "lessThan": "0.19.9",
              "versionType": "other",
              "status": "affected"
            },
            {
              "version": "0.11.0-cuda12",
              "lessThan": "0.18.7-cuda12",
              "versionType": "other",
              "status": "affected"
            },
            {
              "version": "0.19.0-cuda12",
              "lessThan": "0.19.9-cuda12",
              "versionType": "other",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "livebook-dev",
          "product": "livebook",
          "defaultStatus": "unaffected",
          "collectionURL": "https://github.com",
          "packageName": "livebook-dev/livebook",
          "cpes": [
            "cpe:2.3:a:livebook-dev:livebook:*:*:*:*:*:*:*:*"
          ],
          "modules": [
            "Elixir.Livebook.LiveMarkdown.Import",
            "Elixir.Livebook.Session",
            "Elixir.Livebook.FileSystem.Utils"
          ],
          "programFiles": [
            "lib/livebook/live_markdown/import.ex",
            "lib/livebook/session.ex",
            "lib/livebook/file_system/utils.ex"
          ],
          "programRoutines": [
            {
              "name": "'Elixir.Livebook.LiveMarkdown.Import':file_entry_metadata_to_attrs/1"
            },
            {
              "name": "'Elixir.Livebook.Session':file_entry_cache_file/2"
            },
            {
              "name": "'Elixir.Livebook.Session':to_attachment_file_entry/2"
            },
            {
              "name": "'Elixir.Livebook.FileSystem.Utils':resolve_unix_like_path/2"
            }
          ],
          "repo": "https://github.com/livebook-dev/livebook",
          "packageURL": "pkg:github/livebook-dev/livebook",
          "versions": [
            {
              "version": "c02eb984f80a543c7a52b1d882c76f56aa5be743",
              "lessThan": "*",
              "versionType": "git",
              "status": "affected",
              "changes": [
                {
                  "at": "1443dd23df6e7b9203b6797f0695a807aeb81dde",
                  "status": "unaffected"
                },
                {
                  "at": "acf4cb8c0c79b89c795b180f061be7de2d8b5aa9",
                  "status": "unaffected"
                },
                {
                  "at": "50f86982ebf36c22abeb379b55ec0f2859c83bb9",
                  "status": "unaffected"
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV40": [
      {
        "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
        "type": "Secondary",
        "cvssData": {
          "version": "4.0",
          "vectorString": "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",
          "baseScore": 7.0,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "attackRequirements": "NONE",
          "privilegesRequired": "NONE",
          "userInteraction": "ACTIVE",
          "vulnConfidentialityImpact": "NONE",
          "vulnIntegrityImpact": "HIGH",
          "vulnAvailabilityImpact": "LOW",
          "subConfidentialityImpact": "NONE",
          "subIntegrityImpact": "NONE",
          "subAvailabilityImpact": "NONE",
          "exploitMaturity": "NOT_DEFINED",
          "confidentialityRequirement": "NOT_DEFINED",
          "integrityRequirement": "NOT_DEFINED",
          "availabilityRequirement": "NOT_DEFINED",
          "modifiedAttackVector": "NOT_DEFINED",
          "modifiedAttackComplexity": "NOT_DEFINED",
          "modifiedAttackRequirements": "NOT_DEFINED",
          "modifiedPrivilegesRequired": "NOT_DEFINED",
          "modifiedUserInteraction": "NOT_DEFINED",
          "modifiedVulnConfidentialityImpact": "NOT_DEFINED",
          "modifiedVulnIntegrityImpact": "NOT_DEFINED",
          "modifiedVulnAvailabilityImpact": "NOT_DEFINED",
          "modifiedSubConfidentialityImpact": "NOT_DEFINED",
          "modifiedSubIntegrityImpact": "NOT_DEFINED",
          "modifiedSubAvailabilityImpact": "NOT_DEFINED",
          "Safety": "NOT_DEFINED",
          "Automatable": "NOT_DEFINED",
          "Recovery": "NOT_DEFINED",
          "valueDensity": "NOT_DEFINED",
          "vulnerabilityResponseEffort": "NOT_DEFINED",
          "providerUrgency": "NOT_DEFINED"
        }
      }
    ],
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Primary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H",
          "baseScore": 8.1,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "REQUIRED",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "HIGH",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 2.8,
        "impactScore": 5.2
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-08-06T13:03:23.099180Z",
          "id": "CVE-2026-66881",
          "options": [
            {
              "exploitation": "poc"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-23"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:livebook:livebook:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "0.11.0",
              "versionEndExcluding": "0.18.7",
              "matchCriteriaId": "DBA92C3C-AA59-45BF-B266-428314C2A32A"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:livebook:livebook:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "0.19.0",
              "versionEndExcluding": "0.19.9",
              "matchCriteriaId": "7B4998A3-46BF-4E69-8642-1156BB3E7480"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://cna.erlef.org/cves/CVE-2026-66881.html",
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
      "tags": [
        "Vendor Advisory"
      ]
    },
    {
      "url": "https://github.com/livebook-dev/livebook/commit/1443dd23df6e7b9203b6797f0695a807aeb81dde",
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://github.com/livebook-dev/livebook/commit/50f86982ebf36c22abeb379b55ec0f2859c83bb9",
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://github.com/livebook-dev/livebook/commit/acf4cb8c0c79b89c795b180f061be7de2d8b5aa9",
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://github.com/livebook-dev/livebook/security/advisories/GHSA-r4h8-2xpq-v48g",
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
      "tags": [
        "Exploit",
        "Patch",
        "Vendor Advisory"
      ]
    },
    {
      "url": "https://osv.dev/vulnerability/EEF-CVE-2026-66881",
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
      "tags": [
        "Third Party Advisory"
      ]
    },
    {
      "url": "https://github.com/livebook-dev/livebook/security/advisories/GHSA-r4h8-2xpq-v48g",
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
      "tags": [
        "Exploit",
        "Patch",
        "Vendor Advisory"
      ]
    }
  ]
}