It arrived, unannounced, a whisper in the DNS logs. A query, mundane on its surface, yet it signaled a complete breach. From within the supposedly impenetrable Code Interpreter sandbox of Amazon Bedrock’s AgentCore, a covert channel had been established, a digital umbilical cord to the outside world. This wasn’t a hammer blow; it was a skeleton key, turning a security feature into an exfiltration pipeline.
AWS announced global availability of its Bedrock AgentCore framework late last year, pitching it as the go-to solution for building and managing AI agents. Central to its security promise was the Code Interpreter, a component designed to execute AI-generated code. To keep this powerful, yet potentially untrusted, engine contained, AWS employed a sandbox mode, advertised as providing “complete isolation with no external access.” Our investigation, however, revealed that this isolation wasn’t quite as absolute as the marketing suggested.
The Illusion of Isolation
When you’re building AI agents, especially those that might touch sensitive data or interact with external APIs, the security of the execution environment is paramount. AgentCore’s Code Interpreter, touted as offering a secure, offline compute space, promised exactly that. The idea is simple: untrusted code runs in a box, and that box doesn’t talk to anything outside. This is foundational for cloud security – preventing a compromised agent from spiraling into a full account takeover or data breach.
But here’s the thing: as reliance on these cloud-native AI services grows, so does the need to peer beneath the glossy product pages. We looked at AgentCore’s sandbox, specifically its network isolation capabilities, and found a discrepancy between the promise and the reality. The architecture, we suspected, might have unseen egress points necessary for AWS’s own internal operations, points that a determined attacker could potentially use.
How the Breach Occurred
Our journey began with environmental reconnaissance. We poked and prodded, looking for any signs of external network connectivity, a direct contradiction to the sandbox’s advertised “no external network access” policy. Incremental testing mapped the boundaries of DNS resolution, a common technique for covert communication. And there it was: a channel for data exfiltration, hidden in plain sight, masquerading as legitimate network traffic. DNS tunneling.
Watching our DNS server logs, we saw the query arrive instantly, establishing a covert bi-directional channel out of the sandbox. We had successfully turned a ‘secure, offline’ environment into a potential privileged data exfiltration pipeline.
This finding is significant because it demonstrates a fundamental misunderstanding or underestimation of how deeply integrated services can create unintended attack vectors. The Code Interpreter was meant to be a secure island, but it turned out to be connected by a hidden, underwater tunnel.
We also identified a critical security regression related to the AgentCore Runtime’s utilization of a MicroVM Metadata Service (MMDS) that lacked session token enforcement. Before AWS patched this, an attacker could have exploited standard web vulnerabilities like Server-Side Request Forgery (SSRF) to directly extract sensitive credentials. This puts the entire environment at risk – a classic example of how a single, overlooked detail in a complex system can have cascading consequences.
Why This Matters for Developers and the Enterprise
AWS has since updated its developer documentation to reflect that sandbox mode offers limited external network access, a welcome increase in transparency. This highlights a persistent challenge in the cloud: as platforms become more abstract, the underlying mechanics become less visible, creating potential blind spots. When security claims are made about isolation, the devil is truly in the architectural details.
For developers building on AgentCore, this means reassessing assumptions about the sandbox’s capabilities. For security teams, it’s a stark reminder that even managed services require deep scrutiny. The ease with which a seemingly isolated component can become a vector for data exfiltration is alarming.
This isn’t just about AWS; it’s about the inherent complexity of modern cloud architectures. The race to provide ever more powerful and integrated services often outpaces the ability to fully secure every potential pathway. The Bedrock AgentCore incident is a case study in this ongoing tension.
The Unseen Connections
What’s particularly insidious about DNS tunneling is its ability to blend in. DNS is everywhere, and legitimate DNS traffic is a constant hum in network logs. By encoding data within DNS queries and responses, attackers can make their exfiltration traffic look like normal network chatter. It’s the digital equivalent of hiding a message in plain sight, disguised as a common postcard.
This exploit also points to a broader architectural shift. As AI agents become more integral to business operations, they’re being granted more access and privileges. The temptation is to assume that the cloud provider has perfectly compartmentalized everything. But the reality is often a much more interconnected system, where the boundaries between services are more porous than advertised.
The vulnerability was responsibly disclosed, and AWS has implemented fixes, along with recommending mitigation strategies for customers. While users can’t directly patch managed environments, they can use platform-level controls provided by AWS. This underscores the shared responsibility model in the cloud – AWS secures the infrastructure, but customers must understand and configure it appropriately.
A Glimpse into the Future
This incident with Bedrock AgentCore isn’t an isolated event; it’s a symptom of the rapidly evolving, and increasingly complex, landscape of AI in the cloud. As we continue to integrate sophisticated AI capabilities into our most critical systems, the surface area for attack only grows. The discovery of these bypasses serves as a crucial warning sign. It compels us to ask tougher questions about the security primitives underpinning these powerful new tools. Are we truly in control, or are we just trusting the black boxes to behave? The answer, as always, is far more complicated than a simple yes or no.