CVE-2025-53000
📋 TL;DR
This vulnerability allows arbitrary code execution when converting Jupyter notebooks containing SVG output to PDF on Windows systems. Attackers can create a malicious inkscape.bat file that gets executed during the conversion process. Users running nbconvert versions up to 7.16.6 on Windows are affected.
💻 Affected Systems
- jupyter nbconvert
📦 What is this software?
Nbconvert by Jupyter
⚠️ Risk & Real-World Impact
Worst Case
Full system compromise with attacker gaining complete control over the Windows system, potentially leading to data theft, ransomware deployment, or lateral movement within networks.
Likely Case
Local privilege escalation or execution of malicious payloads in the context of the user running nbconvert, potentially leading to data exfiltration or persistence mechanisms.
If Mitigated
No impact if proper controls prevent execution of untrusted notebooks or restrict file system access.
🎯 Exploit Status
Exploitation requires the victim to run nbconvert on a malicious notebook from a directory containing the attacker-controlled inkscape.bat file.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: None available
Vendor Advisory: No official vendor advisory at time of publication
Restart Required: No
Instructions:
No official patch available. Monitor Jupyter project updates for future fixes.
🔧 Temporary Workarounds
Avoid PDF conversion with SVG on Windows
windowsDo not convert notebooks containing SVG output to PDF on Windows systems until a fix is available.
Use alternative conversion formats
windowsConvert to HTML or other formats instead of PDF when SVG content is present.
jupyter nbconvert --to html notebook.ipynb
Run conversions in isolated environments
allUse Docker containers or virtual machines with restricted file system access for nbconvert operations.
🧯 If You Can't Patch
- Restrict nbconvert usage to trusted directories with strict file permissions
- Implement application allowlisting to prevent execution of unauthorized batch files
🔍 How to Verify
Check if Vulnerable:
Check nbconvert version and verify you are running Windows: jupyter nbconvert --version
Check Version:
jupyter nbconvert --version
Verify Fix Applied:
No fix available to verify. Monitor for updates to nbconvert beyond version 7.16.6.
📡 Detection & Monitoring
Log Indicators:
- Unexpected execution of inkscape.bat
- PDF conversion failures with SVG content
- Unusual process spawns from nbconvert
Network Indicators:
- Outbound connections from nbconvert process to unexpected destinations
SIEM Query:
Process creation where parent process contains 'nbconvert' AND command line contains 'inkscape.bat'
🔗 References
- https://github.com/jupyter/nbconvert/blob/4f61702f5c7524d8a3c4ac0d5fc33a6ac2fa36a7/nbconvert/preprocessors/svg2pdf.py#L104
- https://github.com/jupyter/nbconvert/commit/c9ac1d1040459ed1ff9eb34e9918ce5a87cf9d71
- https://github.com/jupyter/nbconvert/issues/2258
- https://github.com/jupyter/nbconvert/releases/tag/v7.17.0
- https://github.com/jupyter/nbconvert/security/advisories/GHSA-xm59-rqc7-hhvf
- https://www.imperva.com/blog/code-execution-in-jupyter-notebook-exports
- https://www.imperva.com/blog/code-execution-in-jupyter-notebook-exports