[PR #2731] [MERGED] fix(manager-v3/security): add litellm supply chain attack detection and improve pip matching #2728

Closed
opened 2026-10-28 21:12:07 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/ComfyUI-Manager/pull/2731
Author: @ltdrdata
Created: 3/25/2026
Status: ✅ Merged
Merged: 3/25/2026
Merged by: @ltdrdata

Base: main ← Head: hotfix/sec-v3


📝 Commits (1)

  • 6e2a84e fix(security): add litellm supply chain attack detection and improve pip matching

📊 Changes

2 files changed (+54 additions, -8 deletions)

View changed files

📝 glob/security_check.py (+53 -7)
📝 pyproject.toml (+1 -1)

📄 Description

Summary

  • Add detection for compromised litellm PyPI packages v1.82.7 and v1.82.8 (PYSEC-2026-2) with remediation guide including .pth file removal and credential rotation steps
  • Fix pip_blacklist scanning bug: remove break that skipped remaining checks after first match, causing missed detections in multi-infection scenarios
  • Replace substring matching with set-based exact matching to prevent false positives on similar version strings (e.g. 1.82.70 incorrectly matching 1.82.7)
  • Add missing ultralytics==8.3.42 to pip_blacklist (was in guide but not in blacklist)

Context

The litellm PyPI package was compromised via a supply chain attack on 2026-03-24. Malicious versions harvest SSH keys, environment variables, API keys, and cloud credentials. Version 1.82.8 additionally installs a .pth file that executes on ANY Python startup without importing litellm.

Reference: https://github.com/BerriAI/litellm/issues/24518


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/ComfyUI-Manager/pull/2731 **Author:** [@ltdrdata](https://github.com/ltdrdata) **Created:** 3/25/2026 **Status:** ✅ Merged **Merged:** 3/25/2026 **Merged by:** [@ltdrdata](https://github.com/ltdrdata) **Base:** `main` ← **Head:** `hotfix/sec-v3` --- ### 📝 Commits (1) - [`6e2a84e`](https://github.com/Comfy-Org/ComfyUI-Manager/commit/6e2a84ed1ecb6c899211528148cac13a8a97bafd) fix(security): add litellm supply chain attack detection and improve pip matching ### 📊 Changes **2 files changed** (+54 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `glob/security_check.py` (+53 -7) 📝 `pyproject.toml` (+1 -1) </details> ### 📄 Description ## Summary - Add detection for compromised `litellm` PyPI packages v1.82.7 and v1.82.8 ([PYSEC-2026-2](https://github.com/pypa/advisory-database/blob/main/vulns/litellm/PYSEC-2026-2.yaml)) with remediation guide including `.pth` file removal and credential rotation steps - Fix `pip_blacklist` scanning bug: remove `break` that skipped remaining checks after first match, causing missed detections in multi-infection scenarios - Replace substring matching with set-based exact matching to prevent false positives on similar version strings (e.g. `1.82.70` incorrectly matching `1.82.7`) - Add missing `ultralytics==8.3.42` to `pip_blacklist` (was in `guide` but not in blacklist) ## Context The litellm PyPI package was compromised via a supply chain attack on 2026-03-24. Malicious versions harvest SSH keys, environment variables, API keys, and cloud credentials. Version 1.82.8 additionally installs a `.pth` file that executes on ANY Python startup without importing litellm. Reference: https://github.com/BerriAI/litellm/issues/24518 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-28 21:12:07 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/ComfyUI-Manager#2728
No description provided.