Medium

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

  • Disclosed: 21.04.2026
  • Updated: 11.10.2026 15:17

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 software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) nbconvert >= 6.5.0, < 7.17.1 7.17.1

References

CVSS score 6.5/10
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

  1. 2022: 1
  2. 2023: 0
  3. 2024: 0
  4. 2025: 1
  5. 2026: 2
  1. nbconvert has an Arbitrary File Write via Path Traversal in Cell Attachment Filenames this entry
    Medium · 6.5 CVE-2026-39377 >= 6.5.0, < 7.17.1 7.17.1

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.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.