GHSA-pjvx-prjx-h659: Path Traversal

Published Oct 22, 2026
·
Updated

Summary

nbconvert <= v7.17.1 has an arbitrary file write vulnerability due to a path traversal in ipynb cell output metadata, more specifically on the filename attribute.

Vulnerable converters : --to markdown, --to latex, --to rst, --to asciidoc.

In ExtractOutputPreprocessor, extractoutput.py:116-119 joins attacker-controlled path to outputfilesdir with no canonicalization check, enabling arbitrary file write.

This is a sibling vulnerability of https://github.com/advisories/GHSA-4c99-qj7h-p3vg.

Impact

If a victim runs nbconvert on a malicious ipynb file, it can create some files with arbitrary data in arbitrary locations, i.e. override authorizedkeys.

Note that running the cell with jupyter overrides the output, so it would "clean up" malicious cells.

PoC

In a ipynb file:

json

"cells": [{ "celltype": "code", "id": "abc123", "executioncount": 1, "metadata": {}, "source": "# PoC", "outputs": [{ "outputtype": "displaydata", "metadata": { "filename": "../../../tmp/PWNED.png" # ← traverses outside outputdir }, "data": { # minimal valid PNG (1×1 pixel) "image/png": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==" } }] }]

Patches

Fixed in - https://github.com/jupyter/nbconvert/commit/ce4bd99aec31d81d759fa8eeb8643179392ec66f - 7.17.2

Affected Software

1 affected componentFixes available
pip/nbconvert>=5.4.0<=7.17.1
7.17.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/nbconvert to a version that resolves this vulnerability.

    Fixed in 7.17.2
  2. Upgrade

    Upgrade jupyter/nbconvert to a version that resolves this vulnerability.

    Fixed in 7.17.2

Event History

Oct 22, 2026
Advisory Published
via GitHub·04:23 PM
Data Sourced
via GitHub·04:23 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

Who is exposed to this issue?

Users running nbconvert version 7.17.1 or earlier are exposed when they convert an attacker-controlled notebook to Markdown, LaTeX, reStructuredText, or AsciiDoc. The malicious content is carried in a cell output's metadata filename attribute.

2

What must an attacker do to exploit it?

An attacker must provide a crafted .ipynb file and persuade a victim to run one of the affected nbconvert conversion modes on it. The crafted filename can use path traversal sequences to write output outside the intended output directory.

3

What is the practical impact of a successful exploit?

The conversion can create files containing attacker-controlled data at arbitrary locations that the converting user is permitted to write. The advisory specifically notes that this could be used to overwrite authorized_keys.

4

How can I determine whether a notebook may be malicious?

Inspect cell outputs for a metadata filename value containing traversal components such as ../, particularly in display_data outputs containing extracted file content. Running the notebook's cell in Jupyter overwrites its output and can remove the malicious cell output.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203