CVE-2024-22415
📋 TL;DR
CVE-2024-22415 is a path traversal vulnerability in jupyter-lsp that allows attackers to access and modify files outside the Jupyter root directory when Jupyter servers are exposed to untrusted networks. This affects installations without proper OS-level file system access controls. All users running vulnerable versions are at risk.
💻 Affected Systems
- jupyter-lsp
- jupyterlab-lsp
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete compromise of the host file system, allowing attackers to read sensitive files, modify system configurations, install malware, or exfiltrate data.
Likely Case
Unauthorized access to project files, configuration files, and potentially sensitive data stored on the same system as the Jupyter server.
If Mitigated
No impact if proper network segmentation and file system permissions are configured, or if the vulnerability is patched.
🎯 Exploit Status
Path traversal vulnerabilities are typically straightforward to exploit once discovered. No public exploit code has been identified.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2.2.2
Vendor Advisory: https://github.com/jupyter-lsp/jupyterlab-lsp/security/advisories/GHSA-4qhp-652w-c22x
Restart Required: Yes
Instructions:
1. Update jupyter-lsp: pip install --upgrade jupyter-lsp==2.2.2
2. Restart Jupyter server
3. Verify the update with: pip show jupyter-lsp
🔧 Temporary Workarounds
Network Isolation
allRestrict Jupyter server access to trusted networks only
Configure firewall rules to limit Jupyter server access to specific IP ranges
File System Permissions
linuxImplement strict OS-level file system access controls
chmod 700 /path/to/jupyter/root
chown jupyter_user:jupyter_group /path/to/jupyter/root
🧯 If You Can't Patch
- Uninstall jupyter-lsp completely if patching is not possible
- Implement strict network access controls and isolate Jupyter servers from untrusted networks
🔍 How to Verify
Check if Vulnerable:
Check jupyter-lsp version: pip show jupyter-lsp | grep Version
Check Version:
pip show jupyter-lsp | grep Version
Verify Fix Applied:
Verify version is 2.2.2 or higher: pip show jupyter-lsp | grep Version
📡 Detection & Monitoring
Log Indicators:
- Unusual file access patterns in Jupyter logs
- Requests attempting to access paths with '../' sequences
Network Indicators:
- External connections to Jupyter server ports (typically 8888)
SIEM Query:
source="jupyter" AND (path="*../*" OR uri="*../*")
🔗 References
- https://github.com/jupyter-lsp/jupyterlab-lsp/commit/4ad12f204ad0b85580fc32137c647baaff044e95
- https://github.com/jupyter-lsp/jupyterlab-lsp/security/advisories/GHSA-4qhp-652w-c22x
- https://github.com/jupyter-lsp/jupyterlab-lsp/commit/4ad12f204ad0b85580fc32137c647baaff044e95
- https://github.com/jupyter-lsp/jupyterlab-lsp/security/advisories/GHSA-4qhp-652w-c22x