安全
AWS AgentCore 因请求凭据的提示词而引发安全漏洞
元数据中传输的令牌、脆弱的虚拟机隔离以及过宽的权限使得黑客攻击变得容易得多
鲍勃,可能是那个与爱丽丝的对话让窃听者伊芙如此感兴趣的鲍勃,正在浏览一个我们称之为 TechHub 的网站。该网站托管了一个由 Amazon Bedrock AgentCore 提供服务的 AI 智能体。鲍勃请求该智能体帮助理解一个 URL 的内容,这是一个凭据端点——如果你不介意的话,是原始 JSON 格式。
该端点返回了实例元数据服务(IMDS)的数据,该服务为 AWS、Azure 和 Google Cloud Platform 等提供商的云实例和虚拟机提供元数据。这些元数据包括区域和可用区、子网、系统映像、安全组以及在生成过程中注入的公钥等详细信息,但也可能包含用户数据和安全令牌等更敏感的信息。
IMDSv2 解决了一些这些风险,但在去年年底鲍勃浏览时,Bedrock AgentCore 仍在使用 IMDSv1。
该智能体提供给鲍勃的元数据包含了该智能体的临时凭据。因此,鲍勃将这些凭据加载到他的本地机器上,并远程枚举了该 AWS 区域中公司的其他智能体。随后,他登录到 Amazon Elastic Container Registry(ECR),拉取智能体容器映像,并以 root 用户身份运行每个映像以检查源代码。
被盗的凭据还使鲍勃能够发现该 AWS 区域中可用的内存资源,包括智能体使用的资源。从中,他能够提取用户及其智能体会话——即他们的对话内容。
Zenity Labs 的研究人员于 2025 年 12 月向 AWS 披露了他们的发现。
“我们发现,通过 AgentCore 部署的智能体可以访问其实例的 IMDS 端点,”Tamir Ishay Sharbat 和 Lana Salameh 在博客文章中表示,“这意味着,外部攻击者只需拥有对单个暴露智能体的聊天访问权限,就可以发送一个提示词,提取其 IMDS 凭据,并利用这些凭据接管同一 AWS 账户和区域中的所有 AgentCore 智能体。”
他们解释说,基本问题是 AgentCore 使用的 Firecracker MicroVM 未能提供足够的网络隔离。因此,攻击者——我知道你在想是莫洛里,但其实是鲍勃——可以指示智能体执行服务器端请求伪造(SSRF)攻击,以获取分配给工作负载的 IAM 角色的临时 AWS 凭据。
而且,由于默认的 AgentCore 角色权限过大——其范围涵盖该区域中的所有 AgentCore 资源,而非单个智能体——任何拥有临时 IAM 凭据的人都可以启动其他智能体、读取会话、写入智能体记忆,并从 AWS Secrets Manager 获取密钥。
“通过利用 IMDS 凭据,我们可以发送直接 API 请求以在不同智能体和用户之间创建新记忆,”Sharbat 和 Salameh 说,“这些记忆反过来会持久地改变智能体行为,并劫持未来会话中智能体的目标。”
Zenity 的研究人员于去年 12 月向 AWS 讲述了鲍勃的故事(或类似的故事),随后在 2026 年 1 月跟进提供了关于 AgentCore 权限过大的详细信息。2026 年 4 月 12 日,AWS 回应安全业界称其报告“具有信息价值”,并关闭了该报告,指出截至 2026 年 2 月 14 日,AgentCore 已更新为 exclusively 使用 IMDSv2。
AgentCore 的过度权限至少一直持续到 2026 年 6 月 22 日,当时 Zenity 进行检查并发现该问题尚未得到修复。Zenity 于 2026 年 9 月 29 日进行了最终审查,此时业界观察到 AWS 已解决了现存问题,从而为鲍勃的假设性冒险故事终于得以讲述铺平了道路。
文章发表后,亚马逊致信表示,Zenity 的研究将已记录的行为歪曲为漏洞,并暗示需要开发者的错误才能启用该攻击。鉴于这与 Zenity 所描述的情形不符,我们已要求对方澄清。®
security
AWS AgentCore security undone by prompt requesting credentials
Tokens transmitted in metadata, weak VM isolation, and expansive permissions make hacking a lot easier
Bob, possibly the same Bob whose conversations with Alice draw so much interest from eavesdropping Eve, was browsing a site we'll call TechHub. The site hosts an AI agent served by Amazon Bedrock AgentCore. Bob asked the agent for help understanding the content of a URL, a credential endpoint – in raw JSON, if you don't mind.
The endpoint returned data from the Instance Metadata Service ( IMDS ), which provides metadata about cloud instances and VMs at providers like AWS, Azure, and Google Cloud Platform. The metadata includes details like region and availability zone, subnets, system images, security groups, public keys injected during spawning, but also potentially more sensitive details like user data and security tokens.
IMDSv2 addresses some of these risks, but back when Bob was browsing late last year, Bedrock AgentCore still used IMDSv1.
The metadata provided to Bob by the helpful agent contained the agent's temporary credentials. So Bob loaded them onto his local machine, and remotely enumerated the company's other agents in that AWS region. He then logged into the Amazon Elastic Container Registry (ECR), pulled the agent container images, and ran each as root to inspect the source code.
The stolen credentials also allowed Bob to discover the memory resources available in that AWS region, including the ones used by agents. From these, he's able to extract the users and their agent sessions – their conversations.
Researchers at Zenity Labs disclosed their findings to AWS in December 2025.
"We discovered that agents deployed through AgentCore could access their instance's IMDS endpoints," said Tamir Ishay Sharbat and Lana Salameh in a blog post . "This meant that an external attacker with nothing more than chat access to a single exposed agent could send a single prompt, extract its IMDS credentials, and use them to take over all AgentCore agents in the same AWS account and region."
The basic problem, they explain, is that the Firecracker MicroVM used by AgentCore failed to provide sufficient network isolation. So an attacker – I know you're thinking it was Mallory, but it was really Bob – could direct the agent to carry out a server-side request forgery ( SSRF ) attack by fetching temporary AWS credentials for the IAM role assigned to the workload.
And because the default AgentCore role was overpermissioned – it was scoped to all AgentCore resources in the region rather than a single agent – anyone in possession of the temporary IAM credentials could launch other agents, read sessions, write agent memories, and fetch secrets from AWS Secrets Manager.
"By leveraging the IMDS credentials we could send direct API requests to create new memories across different agents and users," said Sharbat and Salameh. "These in turn would persistently alter agent behaviour and hijack the agents’ goals across future sessions."
The Zenity researchers told Bob's tale, or something like it, to AWS last December, then followed up in January 2026 with details about AgentCore being overprivileged. On April 12, 2026, AWS responded to the security biz that its report was "informative" and closed the report, noting that as of February 14, 2026, AgentCore had been updated to use IMDSv2 exclusively.
AgentCore's excessive permissions remained in place at least until June 22, 2026, when Zenity checked in and found the issue hadn't been remediated. A final review by Zenity occurred on September 29, 2026, at which point the biz observed that AWS had addressed the extant problems, clearing the way for Bob's hypothetical adventure to finally be told.
Following publication, Amazon wrote in to say that Zenity’s research misrepresents documented behavior as a vulnerability, suggesting that developer error would be required to enable the attack. We’ve asked for clarification since that’s not the scenario Zenity has described. ®
首次收录 · 2026-10-10 · 8.82 分