Hacker News 中文摘要

RSS订阅

通过恶意图表实现Helm本地代码执行 -- Helm local code execution via a malicious chart

文章摘要

Helm存在一个安全漏洞,恶意用户可以通过在Chart.yaml文件中插入恶意内容或利用符号链接,在更新Chart依赖时执行任意代码。该漏洞可能导致系统被攻击者控制,建议用户及时更新至修复版本以避免风险。

文章总结

主要内容总结

标题: 使用恶意 Chart.yaml 内容和符号链接更新 Helm 图表依赖项

来源: GitHub 安全公告

概述:
Helm 项目中发现了一个安全漏洞,攻击者可以通过精心构造的 Chart.yaml 文件和符号链接的 Chart.lock 文件,在更新依赖项时导致本地代码执行。该漏洞影响 Helm v3.18.3 及更早版本,已在 v3.18.4 中修复。

漏洞详情:
- 影响: 当 Chart.yaml 文件中的某些字段被写入 Chart.lock 文件时,如果 Chart.lock 文件被符号链接到可执行文件(如 bash.rc 或 shell 脚本),更新依赖项时会将恶意内容写入该文件,从而导致代码执行。尽管 Helm 会警告符号链接的存在,但并未阻止执行。 - 触发条件: 该漏洞在运行 helm dependency update 或使用 Helm SDK 的 Manager 进行更新时触发。 - 修复版本: Helm v3.18.4 已修复该问题。

临时解决方案:
在更新依赖项之前,确保 Chart.lock 文件不是符号链接。

严重性:
该漏洞的 CVSS 评分为 8.5(高),攻击向量为本地,攻击复杂度低,无需特权,但需要用户交互。

CVE ID:
CVE-2025-53547

致谢:
漏洞由 AlphaSense 的 Jakub Ciolek 披露。

相关链接:
- Helm 安全政策

图片标记:
Image 1: @jake-ciolek

评论总结

  1. 对漏洞描述的不清晰表示质疑

    • TheDong 认为漏洞描述不清楚,特别是关于 Chart.lock 作为 .bashrc 的符号链接的部分。他质疑修复措施为何只针对 Chart.lock,而不是更广泛地禁止图表包含指向其根目录之外的符号链接。
      • "That description seems really unclear, like how can Chart.lock be a symlink to a .bashrc?"
      • "Why is the fix specific to Chart.lock, wouldn't the fix be instead that 'A chart cannot contain any symlinks outside of its root'?"
  2. 对YAML的批评

    • sugarpimpdorsey 认为YAML是过去20年中最愚蠢的想法之一,并指出这不是第一次涉及YAML的远程代码执行漏洞。
      • "YAML is one of the dumbest ideas of the last 20 years to have proliferated."
      • "This is not the first RCE involving YAML and it won't be the last."
  3. 对攻击场景的疑问

    • Sjoerd 询问攻击场景的具体细节,包括安全边界、攻击者如何将包含符号链接的仓库传递给受害者,以及Helm是否通常以特权用户身份运行。
      • "What is the attack scenario here? Where are the security boundaries?"
      • "How does the attacker gets their repository with a symlink in it to the victim?"
  4. 对漏洞工作原理的解释

    • yelirekim 解释了漏洞的工作原理,指出攻击者可以通过恶意 Chart.yaml 和符号链接 Chart.lock 来执行任意代码。
      • "Attacker crafts a malicious Chart.yaml containing arbitrary code."
      • "Helm follows the symlink during the dependency update process without validating the target, allowing arbitrary file writes outside the intended chart directory."
  5. 对攻击向量的质疑

    • codebastard 质疑攻击向量的实际威胁,认为如果攻击者已经能够访问文件系统并放置恶意代码,那么问题已经更大。
      • "Don't I have already bigger problems if you have access to my file system to place there malicious code?"
      • "Is the danger here that one can get an execute permission?"
  6. 对LLM自动发现漏洞的疑问

    • qxfys 询问是否有人有使用LLM自动发现此类漏洞的经验。
      • "Wondering how this kind of thing can be automatically discovered by an LLM."
  7. 对LLM生成图表的安全担忧

    • mkagenius 指出允许LLM通过shell执行生成图表等操作是一个坏主意。
      • "Allowing LLMs to generate charts and what not via shell execution is a bad idea."
  8. 对漏洞发现的积极评价

    • xyst 对漏洞的发现表示赞赏,并提到自己已经根据漏洞描述构思了一个恶意 Chart.yaml
      • "Pretty cool and nice find. I already have a 'malicious' Chart.yaml in mind for this attack just based on the description of vuln."
  9. 对内存安全语言的讽刺

    • quotemstr 讽刺地表示,他以为在内存安全的语言中不会发生安全漏洞。
      • "But I thought security vulnerabilities couldn't happen in memory-safe languages!"