GitHub Advisoryadvisory · PyPI

GHSA-4c99-qj7h-p3vg nbconvert has an Arbitrary File Write via Path Traversal in Cell Attachment Filenames

MEDIUM Published 2026-04-21 Modified 2026-04-21 Official page ↗
Aliases
CVE-2026-39377
Ecosystem
PyPI
Packages
nbconvert
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Weaknesses
CWE-22, CWE-73
Reviewed
2026-04-21

Affected packages

• PyPI nbconvert: >= 6.5.0, < 7.17.1 → fixed in 7.17.1

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 ```

Related

Alias · CVE (1)

  • CVE-2026-39377 The nbconvert tool, jupyter nbconvert, converts Jupyter notebooks to various other formats via Jinja templates. vulnerability

Weakness · CWE (2)

  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory weakness
  • CWE-73 External Control of File Name or Path weakness

References