Advisory

GHSA-4c99-qj7h-p3vg

Also known as: CVE-2026-39377, PYSEC-2026-2229

Summary

nbconvert has an Arbitrary File Write via Path Traversal in Cell Attachment Filenames

Details

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

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2026-04-21 17:18 UTC
Modified
2026-09-10 03:51 UTC

Affected packages and fixes

nbconvert

PyPI · All systems

Affected

  • introduced 6.5.0, fixed 7.17.1 (ecosystem)

Fixed versions

7.17.1

Fix

  • Fixed version 7.17.1
    pip install --upgrade nbconvert==7.17.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences