nbconvert has an Arbitrary File Write via Path Traversal in Cell Attachment Filenames
Medium6.5CVE-2026-39377 · Published Apr 21, 2026 · updated Sep 10, 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 `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 ```
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| nbconvert PyPI | >= 6.5.0, < 7.17.1 | 7.17.1 |
Details and references
More Jupyter advisories
All Jupyter| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| May 5 | Jupyter Server's Authentication Cookies Remain Valid After Password Reset and Server Restart | High6.8 | 2.18.0 |
| May 5 | Jupyter Server has a CORS Origin Validation Bypass via `re.match()` in `allow_origin_pat` | High | 2.18.0 |
| May 5 | Jupyter: path traversal | High7.1 | 2.18.0 |
| May 5 | Jupyter Server has an open redirection vulnerability in `next` query parameter | Medium | 2.18.0 |
| Apr 30 | Jupyter Notebook Vulnerable to Authentication Token Theft via CommandLinker XSS | High | 4.5.7+1 more |
| Apr 21 | nbconvert has an Arbitrary File Read via Path Traversal in HTMLExporter Image Embedding | Medium6.5 | 7.17.1 |