CVE-2024-39700
📋 TL;DR
This CVE describes a remote code execution vulnerability in JupyterLab extension template's GitHub Actions workflow. Attackers can execute arbitrary code on GitHub runners when repositories use the vulnerable template with test options. Extension authors hosting code on GitHub are primarily affected.
💻 Affected Systems
- JupyterLab extension template
📦 What is this software?
Jupyterlab by Jupyter
⚠️ Risk & Real-World Impact
Worst Case
Complete compromise of GitHub runner environment leading to repository takeover, credential theft, and lateral movement to connected systems.
Likely Case
Unauthorized code execution in GitHub Actions workflows, potentially leading to repository manipulation or data exfiltration.
If Mitigated
No impact if template is upgraded or vulnerable workflow is disabled.
🎯 Exploit Status
Exploitation requires creating a malicious pull request against vulnerable repositories.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Template version with commit 035e78c1c65bcedee97c95bb683abe59c96bc4e6
Vendor Advisory: https://github.com/jupyterlab/extension-template/security/advisories/GHSA-45gq-v5wm-82wg
Restart Required: No
Instructions:
1. Upgrade template to latest version. 2. Overwrite update-integration-tests.yml file. 3. Re-apply custom changes if needed. 4. Rebase open pull requests from untrusted users.
🔧 Temporary Workarounds
Disable GitHub Actions
allTemporarily disable GitHub Actions while upgrading template
Remove vulnerable workflow
allDelete or disable update-integration-tests.yml workflow file
rm .github/workflows/update-integration-tests.yml
🧯 If You Can't Patch
- Disable GitHub Actions entirely
- Require manual approval for all workflow runs
- Restrict repository access to trusted users only
🔍 How to Verify
Check if Vulnerable:
Check if .github/workflows/update-integration-tests.yml exists in repository created from JupyterLab extension template
Check Version:
Check template version in copier.yml or repository creation metadata
Verify Fix Applied:
Verify update-integration-tests.yml has been updated to latest version or removed
📡 Detection & Monitoring
Log Indicators:
- Unexpected GitHub Actions workflow executions
- Suspicious commands in workflow logs
- Unauthorized repository modifications
Network Indicators:
- Unusual outbound connections from GitHub runners
- Unexpected API calls to repository
SIEM Query:
source="github-actions" AND (workflow="update-integration-tests" OR command="curl|wget|bash" FROM untrusted)
🔗 References
- https://github.com/jupyterlab/extension-template/commit/035e78c1c65bcedee97c95bb683abe59c96bc4e6
- https://github.com/jupyterlab/extension-template/security/advisories/GHSA-45gq-v5wm-82wg
- https://github.com/jupyterlab/extension-template/commit/035e78c1c65bcedee97c95bb683abe59c96bc4e6
- https://github.com/jupyterlab/extension-template/security/advisories/GHSA-45gq-v5wm-82wg