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:
c. ExtractAttachmentsPreprocessor.enabled = False
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | nbconvert | >= 6.5.0, < 7.17.1 | 7.17.1 |
References
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N- Weakness (CWE)
CWE-22, CWE-73- Platform
- Python (PyPI)
- Package
nbconvert- Disclosed
- 21.04.2026
- Updated
- 11.10.2026 15:17
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2026-2229 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-4c99-qj7h-p3vg - CC BY 4.0
Vulnerability history: nbconvert
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 4
- First → latest
- 08.2022 04.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 1
- Medium 3
Disclosures per year
- 2022: 1
- 2023: 0
- 2024: 0
- 2025: 1
- 2026: 2
-
nbconvert has an Arbitrary File Write via Path Traversal in Cell Attachment Filenames this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.