AI Security AI安全 2h ago Updated 1h ago 更新于 1小时前 49

Gemini Agent-to-Agent Attack Method Exposed Secrets, Enabled Pull Request Tampering Gemini 智能体间攻击方法暴露机密,可篡改拉取请求

Pillar Security discovered an agent-to-agent attack in Google's ADK for Python that enables privilege escalation from low-privileged public agents to high-privileged maintainer-only agents The attack chain involves manipulating a PR triage agent into posting @gemini-cli prompts as comments, triggering a privileged workflow that leaks MCP server tool access The compromised agent had full bash command execution via its GitHub token, enabling remote code execution, PR poisoning, and forged approval Pillar Security在Google ADK for Python中发现agent-to-agent攻击链,可通过低权限代理提权至高权限代理,导致秘密泄露和PR poisoning 攻击者利用@gemini-cli触发高权限工作流,泄露MCP server工具列表,发现bot拥有完整bash命令执行权限,可提取GitHub token 攻击者可伪造完整的PR审批痕迹(triage→review→approve),制造"Gemini已审核通过"的虚假可信记录 Google于6月初收到通知并通过加固修复,但因需社会工程配合而未发放bug bounty;7月底又修复了Antigravity-

72
Hot 热度
68
Quality 质量
70
Impact 影响力

Analysis 深度分析

TL;DR

  • Pillar Security discovered an agent-to-agent attack in Google's ADK for Python that enables privilege escalation from low-privileged public agents to high-privileged maintainer-only agents
  • The attack chain involves manipulating a PR triage agent into posting @gemini-cli prompts as comments, triggering a privileged workflow that leaks MCP server tool access
  • The compromised agent had full bash command execution via its GitHub token, enabling remote code execution, PR poisoning, and forged approval trails
  • A second vulnerability in the Antigravity-SDK-based agent allowed remote code execution without any maintainer interaction, fixed in late July
  • Google hardened the first issue but declined a bug bounty, citing the social engineering requirement for merging malicious PRs

Why It Matters

This research exposes critical supply chain risks in AI agent frameworks that are increasingly adopted by enterprises for automated code review and repository management. It demonstrates how seemingly isolated agent hierarchies can be exploited through prompt injection to escalate privileges, a pattern that applies broadly to any system deploying multi-tiered AI agents with varying access levels.

Technical Details

  • The google/adk-python repository deployed two agent tiers: low-privileged agents open to public interaction and high-privileged agents restricted to maintainers, connected through an MCP (Model Context Protocol) server architecture
  • The attack exploited the PR triage agent's ability to post comments as a Collaborator, using an @gemini-cli comment syntax that triggered the gemini-invoke GitHub Actions workflow
  • The gemini_invoke.yml workflow leaked the privileged agent's available tools through the MCP server, revealing unrestricted bash command execution and access to the GITHUB_TOKEN
  • The attacker chained multiple GitHub API permissions (issues: write, pull-requests: write, and the extracted GITHUB_TOKEN) to forge a complete approval trail, making poisoned PRs appear legitimately reviewed and approved
  • A separate vulnerability in the Antigravity-SDK-based agent's automation features allowed remote code execution without requiring any maintainer interaction or social engineering

Industry Insight

  • Organizations deploying multi-agent AI systems must enforce strict isolation between agent privilege tiers, treating prompt injection between agents as a critical attack vector rather than a theoretical concern
  • AI frameworks integrating with CI/CD pipelines and repository automation should implement capability scoping at the agent level, ensuring that public-facing agents cannot invoke workflows with elevated permissions regardless of prompt content
  • The decline of the bug bounty despite a valid privilege escalation chain highlights a gap in responsible disclosure policies; developers should recognize that agent-to-agent attack paths represent genuine security regressions even when final exploitation requires additional steps

TL;DR

  • Pillar Security在Google ADK for Python中发现agent-to-agent攻击链,可通过低权限代理提权至高权限代理,导致秘密泄露和PR poisoning
  • 攻击者利用@gemini-cli触发高权限工作流,泄露MCP server工具列表,发现bot拥有完整bash命令执行权限,可提取GitHub token
  • 攻击者可伪造完整的PR审批痕迹(triage→review→approve),制造"Gemini已审核通过"的虚假可信记录
  • Google于6月初收到通知并通过加固修复,但因需社会工程配合而未发放bug bounty;7月底又修复了Antigravity-SDK-based agent的另一个RCE漏洞

为什么值得看

本文揭示了AI agent系统中普遍存在的权限隔离失效问题——低权限agent可被操纵成为提权跳板,这对采用多agent协作架构的企业级AI应用具有严重警示意义。同时展示了AI安全研究的新范式:攻击者不再仅针对模型本身,而是利用agent间的通信机制和工具调用权限实施供应链攻击。

技术解析

  • 双权限agent架构:google/adk-python仓库部署了两类agent——低权限agent面向公开用户交互,高权限agent仅限维护者访问,但两者之间存在可通过提示注入跨越的权限边界
  • 攻击链核心机制:攻击者通过操纵PR triage agent在PR评论中注入@gemini-cli <prompt>,触发gemini-invoke.yml工作流,该工作流通过MCP server暴露了高权限agent的工具集,包括完整的bash命令执行能力
  • PR poisoning伪造技术:攻击者利用提取的GitHub token和多个权限原语(issues: write用于编辑triage评论、pull-requests: write用于标签和review请求),伪造出完整的"人类请求审查→Gemini执行→Gemini批准"的审批轨迹
  • 二次漏洞:在ADK仓库的Antigravity-SDK-based agent自动化功能中发现另一个可导致无需维护者交互的远程代码执行漏洞,Google于7月底修复

行业启示

  • Agent权限隔离需重新审视:多agent系统中"低权限入口→高权限出口"的提权路径是系统性风险,企业应建立严格的agent间通信审计和权限最小化验证机制
  • AI辅助代码审查存在信任链风险:当AI agent被赋予PR审批权限时,提示注入攻击可伪造完整的审查痕迹,需引入人类二次确认或多因子验证
  • 开源AI框架的安全审计应成为标配:Google ADK作为官方框架暴露两类漏洞,表明AI agent系统的攻击面远超传统应用,建议在框架层面内置agent行为沙箱和权限边界检测

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Gemini Gemini Agent Agent Security 安全 Open Source 开源 LLM 大模型