fix: update PyTorch to 2.6.0+ to fix torch.load() RCE vulnerability#12323
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (44.71%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## release-1.9.0 #12323 +/- ##
=================================================
- Coverage 48.23% 48.03% -0.20%
=================================================
Files 1848 1847 -1
Lines 160885 161548 +663
Branches 23643 23699 +56
=================================================
- Hits 77607 77605 -2
- Misses 82394 83059 +665
Partials 884 884
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
ogabrielluiz
left a comment
There was a problem hiding this comment.
Code review
Found 2 issues:
torchvision>=0.15.0not bumped alongsidetorch>=2.6.0-- torchvision has strict PyTorch version coupling (0.15.x is for PyTorch 2.0.x, 0.21.x is for PyTorch 2.6.x). A resolver could pick an incompatible older version. This was flagged in previous PRs (#11833, reverted in #11882).
Lines 110 to 113 in 9cc4ed3
agent-lifecycle-toolkit>=0.10.1has no upper bound. Previous pin was~=0.4.4(capped at<0.5). Consider>=0.10.1,<1.0or~=0.10.1. Also note that 0.10.1 transitively pullslitellm<2.0.0, which branchfix/remove-litellm-dependencywas actively removing.
langflow/src/backend/base/pyproject.toml
Lines 316 to 318 in 9cc4ed3
|
@ogabrielluiz thanks for those insights, will make an update. |
…12323) Co-authored-by: Janardan S Kavia <janardanskavia@Janardans-MacBook-Pro.local>
Summary
Updates PyTorch dependency from `>=2.0.0` to `>=2.6.0` to address a Remote Code Execution (RCE) vulnerability in `torch.load()` that affects versions prior to 2.6.0.
Vulnerability Details
Changes Made
1. `pyproject.toml`
2. `src/backend/base/pyproject.toml`
Impact Assessment
Scope: Optional `[docling]` extra only
Risk Level: Low
Compatibility Verification
No Breaking Changes
Additional Updates
agent-lifecycle-toolkit (0.4.4 → 0.10.1)
onnxruntime constraint (`<=1.23` → `<1.24`)
Testing
```bash
Installation test
uv pip install -e ".[docling]" # Resolves successfully
Import test
python -c "import torch; print(torch.version)" # 2.10.0
Unit tests
pytest src/backend/tests/unit/components/docling/ -v # 14/14 passed
pytest src/backend/tests/unit/components/files_and_knowledge/ -k docling # 1/1 passed
```
References
JIRA: https://datastax.jira.com/browse/LE-705
Security issue:
https://github.com/langflow-ai/langflow/security/dependabot/483
https://github.com/langflow-ai/langflow/security/dependabot/415