CVE-2026-39377
JSON

6.5medium

nbconvert has an Arbitrary File Write via Path Traversal in Cell Attachment Filenames

Severity
6.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.27% (higher than 20% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-4c99-qj7h-p3vgPYSEC-2026-2229

Description

The nbconvert tool, jupyter nbconvert, converts Jupyter notebooks to various other formats via Jinja templates. Versions 6.5 through 7.17.0 allow arbitrary file writes to locations outside the intended output directory when processing notebooks containing crafted cell attachment filenames. The `ExtractAttachmentsPreprocessor` passes attachment filenames directly to the filesystem without sanitization, enabling path traversal attacks. This vulnerability provides complete control over both the destination path and file extension. Version 7.17.1 contains a patch.

Affected

Product or packageVersionsReported by
jupyter nbconvert>= 6.5, < 7.17.1, from 6.5.0 before 7.17.1CVE List, NVD
nbconvert (PyPI)from 6.5.0 before 7.17.1GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
PyPA Advisory Database6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Classification

CWE-22CWE-73

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

The nbconvert tool, jupyter nbconvert, converts Jupyter notebooks to various other formats via Jinja templates. Versions 6.5 through 7.17.0 allow arbitrary file writes to locations outside the intended output directory when processing notebooks containing crafted cell attachment filenames. The `ExtractAttachmentsPreprocessor` passes attachment filenames directly to the filesystem without sanitization, enabling path traversal attacks. This vulnerability provides complete control over both the destination path and file extension. Version 7.17.1 contains a patch.

GitHub Advisory Database

Arbitrary File Write via Path Traversal in Cell Attachment Filenames

Summary

nbconvert allows arbitrary file writes to locations outside the intended output directory when processing notebooks containing crafted cell attachment filenames. The ExtractAttachmentsPreprocessor passes attachment filenames directly to the filesystem without sanitization, enabling path traversal attacks. This vulnerability provides complete control over both the destination path and file extension.

Impact

This vulnerability allows writing files with arbitrary content to arbitrary filesystem locations, limited only by the permissions of the process running nbconvert. The attacker controls:

  • Full destination path (via ../ traversal)
  • Filename
  • File extension
  • File content

Patches

  • upgrade to nbconvert v7.17.1

Workarounds

disable ExtractAttachmentsPreprocessor by setting:

c. ExtractAttachmentsPreprocessor.enabled = False
NVD (es)

La herramienta nbconvert, jupyter nbconvert, convierte cuadernos Jupyter a varios otros formatos a través de plantillas Jinja. Las versiones 6.5 hasta la 7.17.0 permiten escrituras de archivos arbitrarias a ubicaciones fuera del directorio de salida previsto al procesar cuadernos que contienen nombres de archivo de adjuntos de celda manipulados. El ’ExtractAttachmentsPreprocessor’ pasa los nombres de archivo de los adjuntos directamente al sistema de archivos sin saneamiento, lo que permite ataques de salto de ruta. Esta vulnerabilidad proporciona control completo tanto sobre la ruta de destino como sobre la extensión del archivo. La versión 7.17.1 contiene un parche.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-39377 changed 2026-04-21CVE Terms of Use
GitHub Advisory DatabaseGHSA-4c99-qj7h-p3vg changed 2026-09-10CC-BY-4.0
NVDCVE-2026-39377 changed 2026-10-26Public domain
PyPA Advisory DatabasePYSEC-2026-2229 changed 2026-07-13CC-BY-4.0