GHSA-xm59-rqc7-hhvf — nbconvert
Fix: jupyter/nbconvert@c9ac1d1GHSA-xm59-rqc7-hhvf is a CWE-427 vulnerability in nbconvert. A fix is available for nbconvert — see the affected versions and patch details below.
nbconvert has an uncontrolled search path that leads to unauthorized code execution on Windows
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for GHSA-xm59-rqc7-hhvf.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Real-World Exposure
nbconvertReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | nbconvert | all versions | 7.17.0pip install --upgrade 'nbconvert==7.17.0' |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for nbconvert, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update nbconvert to 7.17.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-xm59-rqc7-hhvf is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-xm59-rqc7-hhvf can be triaged on real exposure rather than presence alone.
Tailored to GHSA-xm59-rqc7-hhvf. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-xm59-rqc7-hhvf in your dependencies?
O3 Security finds GHSA-xm59-rqc7-hhvf across PyPI dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.