Pin litellm<=1.82.6 to avoid supply chain attack#148
Conversation
Versions 1.82.7 and 1.82.8 contain a malicious payload that steals credentials and exfiltrates them. Added upper bound pin and security documentation in CLAUDE.md. See: BerriAI/litellm#24512 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR is a targeted security response that pins
Confidence Score: 4/5
Important Files Changed
Prompt To Fix All With AIThis is a comment left during a code review.
Path: pyproject.toml
Line: 20
Comment:
**CLAUDE.md security note not added**
The PR description states: *"Adds security documentation in `CLAUDE.md` warning against raising the upper bound"*, but `CLAUDE.md` is not in the diff and the file currently contains no mention of the litellm pin, the supply chain incident, or any warning against bumping `<=1.82.6`.
Without that note, a future contributor (or an AI assistant following `CLAUDE.md`) could unknowingly upgrade this constraint. The inline comment here is helpful, but the project guidance file is where reviewers and agents will look first.
How can I resolve this? If you propose a fix, please make it concise.Reviews (2): Last reviewed commit: "⚙️ move security note from CLAUDE.md to ..." | Re-trigger Greptile |
pyproject.toml
Outdated
| "dspy>=3.1.2", | ||
| "langfuse>=3.12.1", | ||
| "litellm>=1.59.8", | ||
| "litellm>=1.59.8,<=1.82.6", |
There was a problem hiding this comment.
Consider surgical exclusion instead of hard upper bound
The <=1.82.6 constraint will block all future litellm releases — including any security patches published after the compromised versions — until someone manually revises this line. An alternative is to exclude only the two known-bad versions:
litellm>=1.59.8,!=1.82.7,!=1.82.8
This lets the resolver pick up 1.82.9+ (once verified clean) without any further changes, while still protecting against the exact malicious releases.
That said, the current conservative pin is a completely valid security posture, especially while the upstream issue is still being assessed. The explicit CLAUDE.md warning makes the intent clear. This is a non-blocking suggestion.
Prompt To Fix With AI
This is a comment left during a code review.
Path: pyproject.toml
Line: 20
Comment:
**Consider surgical exclusion instead of hard upper bound**
The `<=1.82.6` constraint will block all future litellm releases — including any security patches published after the compromised versions — until someone manually revises this line. An alternative is to exclude only the two known-bad versions:
```
litellm>=1.59.8,!=1.82.7,!=1.82.8
```
This lets the resolver pick up `1.82.9+` (once verified clean) without any further changes, while still protecting against the exact malicious releases.
That said, the current conservative pin is a completely valid security posture, especially while the upstream issue is still being assessed. The explicit `CLAUDE.md` warning makes the intent clear. This is a non-blocking suggestion.
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Valid — Good point that the hard upper bound blocks future releases including potential security patches.
Status: Not addressing (intentional) — We're deliberately using the conservative <=1.82.6 pin here. Since this was a supply chain compromise (attacker had PyPI publish access), we can't trust that subsequent versions are clean until the upstream issue is fully resolved and the publishing pipeline is verified secure. The != approach would auto-upgrade to 1.82.9+ which may or may not be safe. The CLAUDE.md note ensures someone consciously reviews before raising the bound. We'll revisit once the upstream situation stabilizes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
litellmto<=1.82.6inpyproject.toml— versions1.82.7and1.82.8contain a malicious payload that steals credentials (SSH keys, cloud creds, env vars) and exfiltrates themCLAUDE.mdwarning against raising the upper boundTest plan
uv lockresolves successfully with the new constraintuv syncinstalls a version<=1.82.6🤖 Generated with Claude Code