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 package | Versions | Reported by |
|---|---|---|
| jupyter nbconvert | >= 6.5, < 7.17.1, from 6.5.0 before 7.17.1 | CVE List, NVD |
| nbconvert (PyPI) | from 6.5.0 before 7.17.1 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| GitHub | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| PyPA Advisory Database | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
Classification
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
| https://github.com/jupyter/nbconvert/security/advisories/GHSA-4c99-qj7h-p3vg | advisory, mitigation, vendor-advisory, web | |
| https://github.com/jupyter/nbconvert/releases/tag/v7.17.1 | product, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-39377 | advisory | |
| https://github.com/jupyter/nbconvert | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-39377 changed 2026-04-21 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-4c99-qj7h-p3vg changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-39377 changed 2026-10-26 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2229 changed 2026-07-13 | CC-BY-4.0 |