Hacker News 中文摘要

RSS订阅

告诉HN:PyPI上的Litellm 1.82.7和1.82.8版本已被篡改 -- Tell HN: Litellm 1.82.7 and 1.82.8 on PyPI are compromised

文章摘要

litellm 1.82.8版本中的恶意文件litellm_init.pth被发现会窃取用户凭证,存在严重安全风险。该问题已被标记为关键漏洞,建议用户立即检查并更新软件版本。

文章总结

安全警报:litellm 1.82.8版本中的恶意文件litellm_init.pth——凭证窃取程序

事件概述

  • 受影响版本litellm==1.82.8(PyPI上的litellm-1.82.8-py3-none-any.whl包)
  • 恶意文件litellm_init.pth(34,628字节)
  • 危害:该文件会在Python解释器启动时自动执行一个窃取凭证的脚本,无需导入litellm模块。

恶意行为分析

  1. 触发机制.pth文件位于site-packages/目录中,Python解释器启动时会自动执行。
  2. 信息收集
    • 系统信息(主机名、IP地址等)
    • 环境变量(包括API密钥、令牌等敏感信息)
    • SSH密钥、Git凭证、云服务凭证(AWS、GCP、Azure等)
    • 数据库凭证、CI/CD配置、加密货币钱包等
  3. 数据外泄
    • 收集的数据被加密并通过HTTPS POST发送到攻击者控制的服务器(https://models.litellm.cloud/)。

影响范围

  • 本地开发机器
  • CI/CD流水线
  • Docker容器
  • 生产服务器

建议措施

  1. PyPI:立即下架litellm==1.82.8版本。
  2. 用户检查
    • 检查site-packages/目录中是否存在litellm_init.pth文件。
    • 旋转所有可能泄露的凭证(环境变量、配置文件等)。
  3. BerriAI团队:审计PyPI发布凭证和CI/CD流水线是否存在被入侵的迹象。

其他信息

  • 发现时间:2026年3月24日
  • 相关讨论:用户报告称litellm==1.82.7版本也可能受到影响。

(注:原文中的大量评论和无关导航内容已删减,保留了核心安全问题和建议。)

评论总结

以下是评论内容的总结:

主要观点和论据

  1. 对LiteLLM安全性的担忧

    • 多位用户表示因安全风险考虑弃用该软件
    • 引用:"pretty horrifying...Not worth the risk"(评论1)
    • 引用:"I hope that everyone's course of action will be uninstalling this package permanently"(评论11)
  2. 账户被入侵的证据

    • 维护者GitHub账户被入侵,个人仓库被篡改
    • 引用:"Look like the Founder and CTO account has been compromised"(评论5)
    • 引用:"all their personal repos have been edited to say 'teampcp owns BerriAI'"(评论9)
  3. 供应链攻击的影响范围

    • 该软件被广泛使用,影响面大
    • 引用:"A ton of people use litellm as their gateway"(评论13)
    • 引用:"Wow this is in a lot of software"(评论14)
  4. 解决方案讨论

    • 有人建议使用Python的-S选项作为临时防护措施
    • 有人寻求替代方案
    • 引用:"Does anyone know a good alternate project"(评论12)
    • 引用:"The automatic import can be suppressed using Python interpreter's -S option"(评论20)
  5. 事件处理进展

    • PyPI已将该软件隔离
    • 引用:"It's been quarantined on PyPI"(评论24)
    • 引用:"LiteLLM is now in quarantine on PyPI"(评论25)
  6. 对GitHub的批评

    • 对垃圾评论过滤系统表示不满
    • 引用:"there's like 170+ low quality spam comments...I would expect better spam detection system"(评论7)
  7. 更广泛的安全担忧

    • 对软件供应链安全的普遍担忧
    • 引用:"Our modern economy/software industry truly runs on egg-shells"(评论15)
    • 引用:"We need real sandboxing...The attacks are only going to get worse"(评论29)

不同观点平衡

  • 负面评价占主导,主要关注安全风险
  • 少数用户表示幸运避开了影响(评论6,22)
  • 有用户指出标题不够准确(评论16)

关键引用保留

英文引用: 1. "pretty horrifying. I only use it as lightweight wrapper and will most likely move away from it entirely"(评论1) 2. "Look like the Founder and CTO account has been compromised"(评论5) 3. "A ton of people use litellm as their gateway"(评论13)

中文对应: 1. "相当可怕...很可能会完全放弃使用"(评论1) 2. "看起来创始人兼CTO的账户已被入侵"(评论5) 3. "很多人使用litellm作为网关"(评论13)