GHSA-xm59-rqc7-hhvf
nbconvert has an uncontrolled search path that leads to unauthorized code execution on Windows
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.
Blast Radius
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.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for nbconvert. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
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 pinpoints whether GHSA-xm59-rqc7-hhvf is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
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 detects GHSA-xm59-rqc7-hhvf across PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.