nbconvert has an uncontrolled search path that leads to unauthorized code execution on Windows
HighCVE-2025-53000 · Published Dec 18, 2025 · updated Sep 10, 2026
### 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](https://en.wikipedia.org/wiki/Batch_file), 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)](https://cwe.mitre.org/data/definitions/427.html) summarizes the root cause succinctly: > In Windows-based systems, when the `LoadLibrary` or `LoadLibraryEx` function 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 mi...
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| nbconvert PyPI | < 7.17.0 | 7.17.0 |
Details and references
### 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](https://en.wikipedia.org/wiki/Batch_file), 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)](https://cwe.mitre.org/data/definitions/427.html) summarizes the root cause succinctly: > In Windows-based systems, when the `LoadLibrary` or `LoadLibraryEx` function 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._ 1. 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` 2. Run the command `jupyter nbconvert --to pdf Machine_Learning.ipynb`. 3. Wait a few seconds, and you should see a popup showing the message "You've been hacked!" ### Impact All Windows users.
- CVSS 4.0
- 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
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-427
- Also known as
- CVE-2025-53000, PYSEC-2026-1691
- github.com/jupyter/nbconvert/security/advisories/GHSA-xm59-rqc7-hhvf
- nvd.nist.gov/vuln/detail/CVE-2025-53000
- github.com/jupyter/nbconvert/issues/2258
- github.com/jupyter/nbconvert/commit/c9ac1d1040459ed1ff9eb34e9918ce5a87cf9d71
- github.com/jupyter/nbconvert
- github.com/jupyter/nbconvert/blob/4f61702f5c7524d8a3c4ac0d5fc33a6ac2fa36a7/nbconvert/preprocessors/svg2pdf.py#L104
- github.com/jupyter/nbconvert/releases/tag/v7.17.0
- www.imperva.com/blog/code-execution-in-jupyter-notebook-exports
More Jupyter advisories
All Jupyter| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| May 5 | Jupyter Server has an open redirection vulnerability in `next` query parameter | Medium | 2.18.0 |
| Apr 30 | Jupyter Notebook Vulnerable to Authentication Token Theft via CommandLinker XSS | High | 4.5.7+1 more |
| Apr 21 | nbconvert has an Arbitrary File Read via Path Traversal in HTMLExporter Image Embedding | Medium6.5 | 7.17.1 |
| Apr 21 | nbconvert has an Arbitrary File Write via Path Traversal in Cell Attachment Filenames | Medium6.5 | 7.17.1 |
| Apr 3 | JupyterHub has an Open Redirect Vulnerability | Medium6.1 | 5.4.4 |
| Sep 262025 | JupyterLab LaTeX typesetter links did not enforce `noopener` attribute | Low | 4.4.8 |