CVE-2026-39377: nbconvert has an Arbitrary File Write via Path Traversal in Cell Attachment Filenames
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.
Published Apr 21, 2026
Affected packages
nbconvert
- Ecosystem
- PyPI
- Affected
- >= 6.5.0, < 7.17.1
- Fixed in
- 7.17.1
- Check
pip show nbconvert
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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 = FalseCredited to g0blinResearch.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-114140
nbconvert: Arbitrary file write through path traversal in cell output filenames when exporting to md, latex, rst and asciidoc
high8.8Oct 22, 2026CVE-2026-6658
jupyter/nbconvert allows Cross-site Scripting (XSS) via unsanitized `text/vnd.mermaid` output in HTML exports
medium5.4No fixJun 26, 2026CVE-2026-39378
nbconvert has an Arbitrary File Read via Path Traversal in HTMLExporter Image Embedding
medium6.5Apr 21, 2026CVE-2025-53000
nbconvert has an uncontrolled search path that leads to unauthorized code execution on Windows
high8.5Dec 18, 2025
