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. 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:
python c. ExtractAttachmentsPreprocessor.enabled = False
Other sources
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.
— MITRE
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-39377?
CVE-2026-39377 has been rated as a high severity vulnerability due to its potential for arbitrary file write.
How do I fix CVE-2026-39377?
To fix CVE-2026-39377, upgrade nbconvert to version 7.17.1 or later.
What types of files are affected by CVE-2026-39377?
CVE-2026-39377 affects files generated by Jupyter nbconvert which can lead to unintended file writes in output directories.
Which versions of nbconvert are impacted by CVE-2026-39377?
CVE-2026-39377 impacts nbconvert versions from 6.5 to 7.17.0.
Is CVE-2026-39377 exploitable in a shared environment?
Yes, CVE-2026-39377 is particularly exploitable in shared environments where user permissions are misconfigured.