lintsinghua / lintsinghua/DeepAudit

[Security] 依赖版本声明过宽存在供应链攻击风险

Open Beginner friendly
#206 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7k
Forks
850
PR merge metrics
No merged PRs in 30d

Description

项目后端(backend/requirements.txt)对 litellmlangchain 等依赖的版本声明过于宽泛(如 litellm>=1.0.0)。近期 LiteLLM(1.82.7/1.82.8)和 LangChain 生态被发现存在高危供应链投毒漏洞,可直接导致凭证泄露和远程代码执行(RCE),对部署用户构成严重安全威胁。

影响范围

  • 所有使用默认配置部署 DeepAudit 的用户。
  • 潜在泄露:云服务密钥(AK/SK)、数据库密码、API 令牌、SSH 私钥及 K8s 凭证。
  • 横向移动风险:后门可能通过 Kubernetes 环境进一步扩散。

复现步骤

  1. 拉取项目最新代码。
  2. 执行 pip install -r backend/requirements.txt(若使用 Docker,则为 docker build)。
  3. 观察安装过程,恶意版本的 LiteLLM 可能被自动拉取。
  4. 启动服务后,检查 /tmp/.pg_state~/.config/sysmon/ 等路径是否存在恶意文件。

建议修复方案

  1. 锁定安全版本:
# backend/requirements.txt
litellm==1.82.6  # 替换原有版本声明
  1. 清理构建缓存:
pip cache purge && docker builder prune -a
  1. 凭证轮换:强烈建议所有用户立即轮换所有相关凭证。

附加信息

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with backend/requirements.txt and inspect the existing declarations for litellm, langchain, and related dependencies. Run pip install -r backend/requirements.txt, or the documented Docker build if applicable, and verify that the selected versions are the intended safe versions and the build still succeeds. Done means the vulnerable broad dependency resolution is no longer possible.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.