{"id":"CVE-2026-39377","aliases":["GHSA-4c99-qj7h-p3vg","PYSEC-2026-2229"],"title":"nbconvert has an Arbitrary File Write via Path Traversal in Cell Attachment Filenames","summary":"nbconvert has an Arbitrary File Write via Path Traversal in Cell Attachment Filenames","severity":"medium","cvss":6.5,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","vendor":"nbconvert","product":"nbconvert","ecosystem":"pip","affected":["nbconvert >= 6.5.0, < 7.17.1"],"patched":["nbconvert 7.17.1"],"published":"2026-04-21","updated":"2026-09-10","sourceUpdated":"2026-09-10T03:51:00.940697146Z","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-4c99-qj7h-p3vg","references":[{"url":"https://github.com/jupyter/nbconvert/security/advisories/GHSA-4c99-qj7h-p3vg"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-39377"},{"url":"https://github.com/jupyter/nbconvert"},{"url":"https://github.com/jupyter/nbconvert/releases/tag/v7.17.1"}],"tags":["osv","pip"],"epss":0.00266,"epssPercentile":0.18801,"ingestedAt":"2026-07-13T18:57:52.518Z","slug":"CVE-2026-39377","body":"## Overview\n\n# Arbitrary File Write via Path Traversal in Cell Attachment Filenames\n\n## Summary\n\nnbconvert 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.\n\n\n## Impact\n\nThis vulnerability allows writing files with arbitrary content to arbitrary filesystem locations, limited only by the permissions of the process running nbconvert. The attacker controls:\n- Full destination path (via `../` traversal)\n- Filename\n- File extension\n- File content\n\n## Patches\n\n- upgrade to nbconvert v7.17.1\n\n## Workarounds\n\ndisable ExtractAttachmentsPreprocessor by setting:\n\n```python\nc. ExtractAttachmentsPreprocessor.enabled = False\n```\n\n## Affected packages\n\n- `nbconvert >= 6.5.0, < 7.17.1`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `nbconvert 7.17.1`","depth":"sunlit","depthScore":36,"depthScoreParts":{"impact":35.8,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}