{"id":"CVE-2025-53000","aliases":["CVE-2025-53000","GHSA-xm59-rqc7-hhvf","PYSEC-2026-1691"],"related":[],"kind":"vulnerability","state":"published","title":"nbconvert has an uncontrolled search path that leads to unauthorized code execution on Windows","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nOn 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.\n\nWhen 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.\n\n### Details\n_Give all details on the vulnerability. Pointing to the incriminated source code is very helpful for the maintainer._\n\n`nbconvert` searches for an `inkscape` executable when converting notebooks to PDFs here: https://github.com/jupyter/nbconvert/blob/4f61702f5c7524d8a3c4ac0d5fc33a6ac2fa36a7/nbconvert/preprocessors/svg2pdf.py#L104\n\nThe MITRE page on [CWE-427 (Uncontrolled Search Path Element)](https://cwe.mitre.org/data/definitions/427.html) summarizes the root cause succinctly:\n\n> 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:\n> - the directory from which the program has been loaded\n> - the current working directory\n\n### PoC\n\n_Complete instructions, including specific configuration details, to reproduce the vulnerability._\n\n1. Create a directory containing: \n\n    - A hidden bat file called `inkscape.bat` containing `msg * \"You've been hacked!\"`\n\n    - A dummy ipynb file called `Machine_Learning.ipynb`\n\n2. Run the command `jupyter nbconvert --to pdf Machine_Learning.ipynb`.\n\n3. Wait a few seconds, and you should see a popup showing the message \"You've been hacked!\" \n\n### Impact\n\nAll Windows users.","format":"markdown","source":"ghsa"}],"published":"2025-12-17T20:27:59.578Z","modified":"2026-09-10T03:50:32.307Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"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"}],"cwes":["CWE-427"],"affected":[{"ranges":[{"version":"< 7.17.0","status":"affected"}],"vendor":"jupyter","product":"nbconvert","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"7.17.0"}],"ecosystem":"PyPI","package":"nbconvert","purl":"pkg:pypi/nbconvert","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"7.16.6"}],"vendor":"jupyter","product":"nbconvert","cpe":"cpe:2.3:a:jupyter:nbconvert:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"7.17.0"}],"ecosystem":"PyPI","package":"nbconvert","purl":"pkg:pypi/nbconvert","source":"pysec"}],"references":[{"url":"https://github.com/jupyter/nbconvert/security/advisories/GHSA-xm59-rqc7-hhvf","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/jupyter/nbconvert/issues/2258","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/jupyter/nbconvert/commit/c9ac1d1040459ed1ff9eb34e9918ce5a87cf9d71","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/jupyter/nbconvert/blob/4f61702f5c7524d8a3c4ac0d5fc33a6ac2fa36a7/nbconvert/preprocessors/svg2pdf.py#L104","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/jupyter/nbconvert/releases/tag/v7.17.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://www.imperva.com/blog/code-execution-in-jupyter-notebook-exports","tags":["exploit","third-party-advisory","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-53000","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/jupyter/nbconvert","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/nbconvert","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-xm59-rqc7-hhvf","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2025-12-17T20:43:43.579Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-53000","url":"https://www.cve.org/CVERecord?id=CVE-2025-53000","licence":"CVE Terms of Use","modified":"2026-02-18T18:36:34.309Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xm59-rqc7-hhvf","url":"https://github.com/advisories/GHSA-xm59-rqc7-hhvf","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:32.307Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-53000","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-53000","licence":"Public domain","modified":"2026-06-17T09:37:27.170Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1691","url":"https://osv.dev/vulnerability/PYSEC-2026-1691","licence":"CC-BY-4.0","modified":"2026-07-07T17:47:07.138Z"}],"updatedAt":"2026-11-25T22:59:09.595Z","epss":{"score":0.00281,"percentile":0.22164,"date":"2026-12-01T12:00:22.000Z"}}