GHSA-4c99-qj7h-p3vg
nbconvert has an Arbitrary File Write via Path Traversal in Cell Attachment Filenames
At a glance
- Published
- Updated
- CVE
- CVE-2026-39377
- Aliases
- PYSEC-2026-2229
- CVSS_V3
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Description
# 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 packages
| Package | Versions |
|---|---|
| PyPI · nbconvert | introduced 6.5.0, fixed 7.17.1 |
References
- https://github.com/jupyter/nbconvert/security/advisories/GHSA-4c99-qj7h-p3vg WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-39377 ADVISORY
- https://github.com/jupyter/nbconvert PACKAGE
- https://github.com/jupyter/nbconvert/releases/tag/v7.17.1 WEB
Sources
| Source | Licence |
|---|---|
| OSV.dev | CC-BY 4.0 — GitHub Advisory Database |