CVE-2025-53000High▾ Twilightnbconvert has an uncontrolled search path that leads to unauthorized code execution on Windows
▾ Twilight zone — High severity, or a signal on a lesser flaw
impact 41.3 · likelihood 0.1 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Jul 8.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
0.2%
0.2% → 0.3%
Last analysed / modified upstream
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.
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
Complete instructions, including specific configuration details, to reproduce the vulnerability.
Create a directory containing:
A hidden bat file called inkscape.bat containing msg * "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!"
All Windows users.
nbconvert < 7.17.0Upgrade to a patched release:
nbconvert 7.17.0Connected by shared product, vendor, weakness, or advisory.
CVE-2021-32862Medium· 5.4nbconvert vulnerable to cross-site scripting (XSS) via multiple exploit paths
CVE-2026-39378Medium· 6.5nbconvert has an Arbitrary File Read via Path Traversal in HTMLExporter Image Embedding
CVE-2026-39377Medium· 6.5nbconvert has an Arbitrary File Write via Path Traversal in Cell Attachment Filenames