nbconvert has an uncontrolled search path that leads to unauthorized code execution on Windows
Summary
On Windows, converting a notebook containing SVG output to a PDF results in unauthorized code execution. Specifically, a third party can create a inkscape.bat file that defines a Windows batch script, capable of arbitrary code execution.
When a user runs jupyter nbconvert --to pdf on a notebook containing SVG output to a PDF on a Windows platform from this directory, the inkscape.bat file is run unexpectedly.
Details
Give all details on the vulnerability. Pointing to the incriminated source code is very helpful for the maintainer.
nbconvert searches for an inkscape executable when converting notebooks to PDFs here: https://github.com/jupyter/nbconvert/blob/4f61702f5c7524d8a3c4ac0d5fc33a6ac2fa36a7/nbconvert/preprocessors/svg2pdf.py#L104
The MITRE page on CWE-427 (Uncontrolled Search Path Element) summarizes the root cause succinctly:
In Windows-based systems, when the
LoadLibraryorLoadLibraryExfunction is called with a DLL name that does not contain a fully qualified path, the function follows a search order that includes two path elements that might be uncontrolled:
- the directory from which the program has been loaded
- the current working directory
PoC
Complete instructions, including specific configuration details, to reproduce the vulnerability.
-
Create a directory containing:
-
A hidden bat file called
inkscape.batcontainingmsg * "You've been hacked!" -
A dummy ipynb file called
Machine_Learning.ipynb
-
-
Run the command
jupyter nbconvert --to pdf Machine_Learning.ipynb. -
Wait a few seconds, and you should see a popup showing the message "You've been hacked!"
Impact
All Windows users.
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| Python (PyPI) | nbconvert | < 7.17.0 | 7.17.0 |
Verweise
- https://github.com/jupyter/nbconvert/security/advisories/GHSA-xm59-rqc7-hhvf
- https://nvd.nist.gov/vuln/detail/CVE-2025-53000
- https://github.com/jupyter/nbconvert/issues/2258
- https://github.com/jupyter/nbconvert/commit/c9ac1d1040459ed1ff9eb34e9918ce5a87cf9d71
- https://github.com/jupyter/nbconvert
- https://github.com/jupyter/nbconvert/blob/4f61702f5c7524d8a3c4ac0d5fc33a6ac2fa36a7/nbconvert/preprocessors/svg2pdf.py#L104
- https://github.com/jupyter/nbconvert/releases/tag/v7.17.0
- https://www.imperva.com/blog/code-execution-in-jupyter-notebook-exports
- https://pypi.org/project/nbconvert
- https://github.com/advisories/GHSA-xm59-rqc7-hhvf
- CVSS-Vektor
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N- Schwäche (CWE)
CWE-427- Plattform
- Python (PyPI)
- Paket
nbconvert- Veröffentlicht
- 18.12.2025
- Aktualisiert
- 11.10.2026 15:17
Quellen und Lizenzen
OSV / GitHub Advisory Database - PYSEC-2026-1691 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-xm59-rqc7-hhvf - CC BY 4.0
Schwachstellenhistorie: nbconvert
Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
- Einträge insgesamt
- 4
- Erste → letzte
- 08.2022 04.2026
- Ohne Fix
- 0
- In Angriffen ausgenutzt
- 0
Verteilung nach Schweregrad
- Hoch 1
- Mittel 3
Veröffentlichungen pro Jahr
- 2022: 1
- 2023: 0
- 2024: 0
- 2025: 1
- 2026: 2
-
nbconvert has an uncontrolled search path that leads to unauthorized code execution on Windows dieser Eintrag
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.