CVE-2025-53000: nbconvert has an uncontrolled search path that leads to unauthorized code execution on Windows

Published Dec 17, 2025
·
Updated

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 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 MachineLearning.ipynb

2. Run the command jupyter nbconvert --to pdf MachineLearning.ipynb.

3. Wait a few seconds, and you should see a popup showing the message "You've been hacked!"

Impact

All Windows users.

Other sources

The nbconvert tool, jupyter nbconvert, converts Jupyter notebooks to various other formats via Jinja templates. Versions of nbconvert up to and including 7.16.6 on Windows have a vulnerability in which 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. As of time of publication, no known patches exist.

NVD

The nbconvert tool, jupyter nbconvert, converts Jupyter notebooks to various other formats via Jinja templates. Versions of nbconvert up to and including 7.16.6 on Windows have a vulnerability in which 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. This issue has been patched in version 7.17.0.

MITRE

Affected Software

4 affected components
pypi/nbconvert<=7.16.6
pip/nbconvert<=7.16.6
All of the following
jupyter Nbconvert Python<=7.16.6
Microsoft Windows

Event History

Dec 17, 2025
CVE Published
via MITRE·08:27 PM
Data Sourced
via MITRE·08:27 PM
DescriptionWeakness
Data Sourced
via NVD·09:16 PM
DescriptionSeverityWeaknessAffected Software
Dec 18, 2025
Advisory Published
via GitHub·10:03 PM
Data Sourced
via GitHub·10:03 PM
DescriptionWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-53000?

CVE-2025-53000 is classified as a medium severity vulnerability due to the potential for unauthorized code execution.

2

How do I fix CVE-2025-53000?

To fix CVE-2025-53000, upgrade nbconvert to version 7.16.7 or later.

3

What platforms are affected by CVE-2025-53000?

CVE-2025-53000 specifically affects Windows platforms running nbconvert versions up to and including 7.16.6.

4

What exploit can be performed using CVE-2025-53000?

CVE-2025-53000 allows an attacker to execute unauthorized code when converting Jupyter notebooks containing SVG output to a PDF.

5

Is there a workaround for CVE-2025-53000?

As a temporary workaround for CVE-2025-53000, avoid converting Jupyter notebooks with SVG outputs until the software is updated.

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