CVE-2026-39377

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

Published Apr 21, 2026 CVSS 3.1 · 6.5 Medium EPSS < 1% KEV · Not listed
Description
The nbconvert tool, jupyter nbconvert, converts Jupyter notebooks to various other formats via Jinja templates. Versions 6.5 through 7.17.0 allow 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. Version 7.17.1 contains a patch.

Analysis

AI-generated

Technical impact

The vulnerability lies in the ExtractAttachmentsPreprocessor of nbconvert, which accepts cell attachment filenames without sanitization. Attackers can craft notebook files containing specially constructed filenames that include directory traversal sequences, thereby instructing nbconvert to write files outside the intended output directory. This results in arbitrary file writes, including overwriting sensitive system files or creating executables. The flaw is a classic path traversal and insecure file write weakness.

Affected Systems

The issue affects all releases of the jupyter:nbconvert package from version 6.5 up through 7.17.0. Versions 7.17.1 and later incorporate a fix. Users running the affected ranges should verify their installed nbconvert version and ensure it is upgraded to 7.17.1 or a newer release.

Risk and Exploitability

The CVSS score of 6.5 indicates a medium severity risk. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector is the delivery of a malicious notebook to a system that automatically processes it with nbconvert, such as a CI/CD pipeline, a shared analysis platform, or an automated conversion service. If the nbconvert process runs with elevated permissions, the attacker could potentially overwrite critical files or deploy malware. Administrators should consider the operating context and process privileges when assessing impact.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade jupyter nbconvert to version 7.17.1 or later, which patches the path traversal flaw.
  • Restrict the file system permissions of the user account running nbconvert so that it cannot write outside the intended directory.
  • Validate or sanitize attachment filenames before processing or disable attachment extraction for untrusted notebooks.

Generated by OpenCVE AI on April 21, 2026 at 15:34 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-4c99-qj7h-p3vg nbconvert has an Arbitrary File Write via Path Traversal in Cell Attachment Filenames
History
Type Values Removed Values Added
CPEs cpe:2.3:a:jupyter:nbconvert:*:*:*:*:*:python:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Jupyter
Jupyter nbconvert
Vendors & Products Jupyter
Jupyter nbconvert
Type Values Removed Values Added
Description The nbconvert tool, jupyter nbconvert, converts Jupyter notebooks to various other formats via Jinja templates. Versions 6.5 through 7.17.0 allow 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. Version 7.17.1 contains a patch.
Title nbconvert has an Arbitrary File Write via Path Traversal in Cell Attachment Filenames
Weaknesses CWE-22
CWE-73
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N'}

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-73

    External Control of File Name or Path

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 21, 2026, 7:49 PM
Reserved
Apr 6, 2026, 9:29 PM
Status
Analyzed
Published
Apr 21, 2026, 1:16 AM
Modified
Oct 26, 2026, 10:10 PM
Severity
Moderate
Public date
Apr 21, 2026, 12:14 AM