{"id":148222,"date":"2026-08-22T16:28:10","date_gmt":"2026-08-22T16:28:10","guid":{"rendered":"https:\/\/www.europesays.com\/ai\/148222\/"},"modified":"2026-08-22T16:28:10","modified_gmt":"2026-08-22T16:28:10","slug":"securing-sandboxes-what-happens-when-ai-agents-escape-containment","status":"publish","type":"post","link":"https:\/\/www.europesays.com\/ai\/148222\/","title":{"rendered":"Securing sandboxes: What happens when AI agents escape containment?"},"content":{"rendered":"<p>On July 16, the team at Hugging Face noticed something weird moving through their production systems: An intruder that was cloning datasets, harvesting credentials, and hopping between internal clusters faster than a human could type. Five days into the investigation, the authorities were notified, and several days later, OpenAI traced the intruder back to one of its models.<\/p>\n<p>\u201cTwo frontier models escaped their test environments this summer; only one of them had a funny reason.\u201d<\/p>\n<p>That prompted Anthropic to look through its own test logs, and it found that similar events had occurred three times. One Claude model probed nine thousand hosts in a single run without setting off any alarms. Another slipped a poisoned package into the public Python registry, compromising fifteen machines before it was caught. The third incident dated back to April and went undetected for three months until a rival\u2019s error prompted the audit. Nobody had noticed. Two of the three companies involved didn\u2019t know anything was amiss until they got a call.<\/p>\n<p>Containment by instruction<\/p>\n<p>A sandbox, in the context of AI testing, means a model gets a task, a set of tools, and an instruction: no access to the outside world.<\/p>\n<p><a href=\"https:\/\/thenewstack.io\/openai-huggingface-sandbox-breach\/\" data-type=\"link\" data-id=\"https:\/\/thenewstack.io\/openai-huggingface-sandbox-breach\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">OpenAI\u2019s model found an exploit<\/a> in a tool it was allowed to use, and leveraged it to access the open Internet. Anthropic\u2019s models didn\u2019t even need that. The models were told a path didn\u2019t exist, so when their tasks led them down a path that wasn\u2019t supposed to be there, they treated it as part of the exercise.<\/p>\n<p>\u201cIn both instances, the only constraint was an instruction. There was no mechanism outside the model itself to ensure those instructions wouldn\u2019t be treated as optional.\u201d<\/p>\n<p>In both instances, the only constraint was an instruction. There was no mechanism outside the model itself to ensure those instructions wouldn\u2019t be treated as optional.<\/p>\n<p>So how did they escape?<\/p>\n<p>OpenAI\u2019s agent was being evaluated on a cybersecurity benchmark called CyberGym. During the test, it chained a code-execution flaw in a dataset loader to a second flaw in the platform dataset configuration file handler. It used the combined exploit to run commands on a live processing worker. From there it grabbed a write-scoped access token and cloned a private dataset as a staging area, which became a dead drop for its own tools. By the time anyone noticed, the intrusion had been running for three days, touched several internal clusters, and compromised accounts at four other companies, according to Hugging Face\u2019s own review.<\/p>\n<p>What it wanted, in the end, was comical: the answer key to the test it was taking.<\/p>\n<p><a href=\"https:\/\/thenewstack.io\/anthropic-claude-containment-failure\/\" data-type=\"link\" data-id=\"https:\/\/thenewstack.io\/anthropic-claude-containment-failure\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">Anthropic\u2019s three incidents<\/a> were nowhere near as convoluted. Its models were being run through security exercises against third-party evaluation partners, and the only thing keeping them from accessing the Internet was an instruction not to. One incident involved an SQL injection targeting a resource the model wasn\u2019t supposed to be able to access. Another, during an exercise where the usual safeguards were deliberately switched off, ended with a Claude model publishing a malicious package to the Python Package Index, and fifteen machines picking it up before it was pulled down. No zero-day exploit. No dramatic escape. Just locked doors that turned out to be mirages.<\/p>\n<p>The structural weakness<\/p>\n<p>Strip away the specifics, and both incidents share the same root cause: there was nothing outside the model\u2019s own judgment that could enforce the limitations placed on it. A credential that shouldn\u2019t have been able to access the open Internet did so anyway. An instruction that should\u2019ve stopped a plan cold got treated as just another input to reason around.<\/p>\n<p>\u201cIf a fence doesn\u2019t hold during testing, it won\u2019t hold in production.\u201d<\/p>\n<p>It feels like we\u2019ve spent the last year reliving the same problem in new ways. For example, in deleted databases, in poisoned supply chains, in every <a href=\"https:\/\/thenewstack.io\/ai-agents-no-laws\/\" data-type=\"link\" data-id=\"https:\/\/thenewstack.io\/ai-agents-no-laws\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">credential an agent inherited<\/a> because provisioning it correctly took one extra step nobody got around to. The only delta is where the boundary was supposed to be: around the dev experiment, meant to contain dangerous capabilities, or standing between it and every production system it could reach. If a fence doesn\u2019t hold during testing, it won\u2019t hold in production.<\/p>\n<p>How do we break out of the loop?<\/p>\n<p>Unfortunately, the answer isn\u2019t self-improvement. A more capable model wouldn\u2019t have caught any of this. The only way to fix it is with Infrastructure that verifies where a model actually is, rather than trusting its reports.<\/p>\n<p>Egress controls that are closed by default. A test environment that can reach the open Internet is probably not a great idea. Outbound traffic should be locked to an explicit allowlist. Never assume a model will simply decline to look for a way out. \u201cNo internet access\u201d needs to be a network-enforced fact, not just an instruction.<\/p>\n<p>Narrowly scoped credentials with short lifespans. Both incidents ran, in part, on tokens that extended beyond what the tasks required. A credential built for one evaluation run, scoped to nothing beyond it, and expiring on a timer, can\u2019t become the write-scoped key that turns into a lateral-movement problem across multiple clusters. Yes, it will be a chore; so gird your patience by imagining having to explain to company leadership why taking steps to avert a catastrophe was too tedious to bother with.<\/p>\n<p>Policy gates that sit outside the agent\u2019s reasoning. An agent that can decide for itself whether an action is in scope is grading its own test. A plan should have clear rules written in code, evaluated by something other than the agent, before anything executes. Open Policy Agent has become a de facto default here for exactly this reason. It doesn\u2019t care how confident the plan sounds; nothing runs without proper authorization from an external source.<\/p>\n<p>An audit trail that is entirely independent of the agent. Both incidents were discovered by rereading logs after the fact, not by asking the models what happened. That\u2019s how oversight should be done. As the proverb goes: Quis custodiet ipsos custodes? Who watches the watchers? A system of record that captures what actually occurred, regardless of the agent\u2019s own account of itself, is the only version of events worth trusting.<\/p>\n<p>This is a sign<\/p>\n<p>The industry spent a decade learning that the CI\/CD pipeline is <a href=\"https:\/\/thenewstack.io\/npm-supply-chain-worm-attack\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">an attack vector<\/a> that requires real fortification, not just bolted-on convenience. Test environments for frontier models are following the same arc at a faster pace. The next time one of these agents escapes containment, it\u2019ll probably be one built around finding unlocked doors, which will make it substantially more dangerous than a coding agent that deletes a few databases.<\/p>\n<p>Test rigs must be treated as if they hold something real, because, as far as the credentials are concerned, they do. A sign on a door is never going to be enough to keep everyone out; there has to be a lock whose robustness correlates to the value of what it guards.<\/p>\n<p>\u201cA sign on a door is never going to be enough to keep everyone out; there has to be a lock whose robustness correlates to the value of what it guards.\u201d<\/p>\n<p>Whether by a state-sponsored crew probing a water management system in the middle of the night, or a company\u2019s own model trying to shave a few points off a benchmark, boundaries will always be tested. Two labs found out this summer, and the story needs to be taken seriously. The vulnerabilities are real, the transparency from the labs is welcome, and the containment failures are a cause for concern.<\/p>\n<p>Catching a model that tried the handle is the easy part; both labs proved that. The more challenging, and therefore critical, part is making sure the next containment environment actually has doors that are firmly locked.<\/p>\n<p>\t<a class=\"row youtube-subscribe-block\" href=\"https:\/\/youtube.com\/thenewstack?sub_confirmation=1\" target=\"_blank\" rel=\"nofollow noopener\"><\/p>\n<p>\n\t\t\t\tYOUTUBE.COM\/THENEWSTACK\n\t\t\t<\/p>\n<p>\n\t\t\t\tTech moves fast, don&#8217;t miss an episode. Subscribe to our YouTube<br \/>\n\t\t\t\tchannel to stream all our podcasts, interviews, demos, and more.\n\t\t\t<\/p>\n<p>\t\t\t\tSUBSCRIBE<\/p>\n<p>\t<\/a><\/p>\n<p>    Group<br \/>\n    Created with Sketch.<\/p>\n<p>\t\t<a href=\"https:\/\/thenewstack.io\/author\/zeen-rachidi\/\" class=\"author-more-link\" rel=\"nofollow noopener\" target=\"_blank\"><\/p>\n<p>\t\t\t\t\t<img decoding=\"async\" class=\"post-author-avatar\" src=\"https:\/\/www.europesays.com\/ai\/wp-content\/uploads\/2026\/07\/0a9a86e3-cropped-03077771-zrachidi2-600x600.jpg\"\/><\/p>\n<p>\n\t\t\t\t\t\t\tZeen is a designer and builder that&#8217;s been blessed to live and learn on three continents. He likes problem-solving, being helpful, and making useful things. He got his BSc in Computer Science, but got bored babysitting servers, so he went&#8230;\t\t\t\t\t\t<\/p>\n<p>\t\t\t\t\t\tRead more from Zeen Rachidi\t\t\t\t\t\t<\/p>\n<p>\t\t<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"On July 16, the team at Hugging Face noticed something weird moving through their production systems: An intruder&hellip;\n","protected":false},"author":2,"featured_media":148223,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[405,7537,56027,12100],"class_list":["post-148222","post","type-post","status-publish","format-standard","has-post-thumbnail","category-agentic-ai","tag-ai-agents","tag-artificial-intelligence-agents","tag-env-zero","tag-post-contributed"],"_links":{"self":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts\/148222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/comments?post=148222"}],"version-history":[{"count":0,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts\/148222\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/media\/148223"}],"wp:attachment":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/media?parent=148222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/categories?post=148222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/tags?post=148222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}