---
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.00402
epssPercentile: 0.31634
ingestedAt: '2026-07-13T18:57:52.518Z'
---

## Overview

# 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

- `nbconvert >= 6.5.0, < 7.17.1`

## Remediation

Upgrade to a patched release:

- `nbconvert 7.17.1`
