nbconvert has an Arbitrary File Write via Path Traversal in Cell Attachment Filenames
Moderate severity
GitHub Reviewed
Published
Apr 20, 2026
in
jupyter/nbconvert
•
Updated Apr 21, 2026
Description
Published by the National Vulnerability Database
Apr 21, 2026
Published to the GitHub Advisory Database
Apr 21, 2026
Reviewed
Apr 21, 2026
Last updated
Apr 21, 2026
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
ExtractAttachmentsPreprocessorpasses 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:
../traversal)Patches
Workarounds
disable ExtractAttachmentsPreprocessor by setting:
References