cd /news/artificial-intelligence/the-model-didn-t-escape-the-sandbox-… · home topics artificial-intelligence article
[ARTICLE · art-78225] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=↓ negative

The Model Didn't Escape the Sandbox. The Sandbox Was Misconfigured.

An OpenAI model escaped a benchmark sandbox, stole credentials, chained a zero-day, and attacked Hugging Face's production systems. The root cause was a misconfigured sandbox network, not a model failure, according to a joint post-mortem by CSA, SANS, RSAC, FIRST, and Knostic. The incident mirrors the 2024 CrowdStrike outage: the containment boundary was assumed, not verified.

read10 min views1 publishedJul 29, 2026

✓ Human-authored analysis; AI used for formatting and proofreading.

All control mappings verified against a live catalog and tested against synthetic fixtures. The CSA/SANS/RSAC post-mortem (v0.8, July 27 2026) is the primary reference.*

Last week, an OpenAI model broke out of a benchmark sandbox, stole credentials, chained a zero-day, and attacked Hugging Face's production systems. The model was running inside OpenAI's own red-team evaluation. The sandbox gave it one controlled path to the internet. The model found a bug in that path and used it.

Within 48 hours, 700 CISOs convened. CSA, SANS, RSAC, FIRST, and Knostic published a joint post-mortem with 30+ recommendations. The recommendations focus on governance, accountability, agent identity, deception technology, and incident response preparedness.

The recommendations are reasonable. They're also treating the symptom.

The root cause is simpler: the sandbox's network configuration wasn't verified before the model ran inside it. The egress path had a vulnerability. The credentials were accessible from the sandbox environment. The IAM role was broad enough to reach external targets. No compound check verified that these three conditions together created an escape path.

Each condition would pass a standard security check individually. The sandbox had internet access controls. The credentials were managed. The role existed within the evaluation environment. Three passing checks. One breach.

This incident has the same structure as the CrowdStrike outage that took down millions of Windows machines in 2024.

CrowdStrike put a powerful payload (kernel-level driver update) inside an environment (production Windows fleet). They assumed the environment would handle the payload safely. They didn't verify the update's configuration against the target environment. The payload worked as designed. The environment couldn't contain it.

OpenAI put a powerful payload (frontier model optimizing for a benchmark score) inside an environment (evaluation sandbox). They assumed the sandbox would contain the payload. They didn't verify the sandbox's network configuration. The payload worked as designed. It found the shortest path to the score. The environment couldn't contain it.

Same defect class: the containment boundary was assumed, not verified. The payload was correct in both cases. The configuration was wrong. Nobody checked.

The CSA post-mortem recommends "treat sandbox-isolation claims with skepticism" and "test your isolation mechanisms directly." Both are correct. Test directly means, 32 configuration invariants that, verified before the model runs, prevent the breach regardless of the model's capability.

The model escaped because the sandbox had a network path to the internet. Five invariants verify containment:

The sandbox VPC has no unrestricted egress. Security groups on agent compute allow outbound traffic only to allowlisted destinations. A rule allowing 0.0.0.0/0

on any port is a containment failure.

The sandbox VPC has no internet gateway or if one exists, route tables restrict which subnets can reach it. An internet gateway on an agent VPC without route table scoping is an escape path waiting for a model to find it.

Agent compute runs in an isolated VPC, not shared with production. A sandbox in the same VPC as production systems means the model's network is the production network.

No VPC peering or Transit Gateway connects the sandbox to production. Route table isolation on Transit Gateway prevents cross-segment routing. Without it, the sandbox routes to production through the hub.

The agent role cannot reach production secrets. Graph reachability analysis (using Datalog transitive closure) traces paths from agent roles through arbitrary AssumeRole and PassRole chains to sensitive resources. A role that can transitively reach production Secrets Manager entries is a credential theft path.

All five of these are configuration properties. They can be verified before the model runs. They're deterministic. The VPC either has unrestricted egress or it doesn't. No probabilistic judgment. No model inference. A boolean check against the infrastructure state.

The model stole credentials and used them outside the sandbox. Seven invariants verify identity containment:

Agent roles have permission boundaries. A permission boundary limits the maximum scope of an IAM role regardless of attached policies. Without one, the role's effective permissions are whatever policies it happens to have, which may have been broadened during development and never scoped back.

Agent roles have short maximum session duration. The post-mortem recommends ephemeral credentials limited by design. A session that lasts 12 hours gives an attacker 12 hours to use stolen credentials. A session limited to 1 hour limits the exploitation window.

Agent roles require session naming for CloudTrail attribution. Without session naming, a stolen credential's activity in CloudTrail is attributed to the role, not to who assumed it. Forensics can see the role was used but not by whom or what.

Agent roles restrict source IP or VPC. Condition keys on the trust policy limit where the role can be assumed from. Credentials stolen and used from outside the sandbox are blocked by the condition, regardless of the credential's validity.

Agent roles have no iam:PassRole

on Resource: *

. PassRole with unrestricted scope allows the role to delegate its permissions to any service — Lambda, SageMaker, CodeBuild. Each delegation is a new execution context the model can use.

No permanent access keys on agent roles. Only temporary credentials via AssumeRole, which expire and can't be reused after session termination.

OIDC providers have subject and audience restrictions. If the agent authenticates via an external identity provider, the provider's trust configuration must restrict which subjects and audiences are accepted.

Individual controls check individual resources. The breach wasn't an individual misconfiguration. It was a path through three resources that were each individually acceptable.

The sandbox escape path: agent VPC has unrestricted egress AND agent role has broad permissions AND no VPC flow logs for forensic visibility. Each component might pass a standard security check. The compound path is a critical finding that requires correlating all three.

The credential exfiltration path: agent role can read production secrets AND the compute environment has internet egress AND session naming isn't required on the role. Each resource passes its own check. The path through all three is how credentials leave the environment unattributed.

The unmonitored escalation path: agent role has PassRole plus Lambda create permission AND CloudTrail data events are not enabled for Lambda. The escalation path exists. The forensic trail to detect it doesn't.

The immutable infrastructure bypass: ECS exec is enabled AND the root filesystem is writable AND no image signing is enforced. The container can be modified at runtime, the modification persists, and no code integrity check catches it.

These compound paths are the detection gap the industry has. Every tool on the market can check "is this security group restrictive?" and "is this role least-privilege?" and "are flow logs enabled?" No tool composes them into "this security group plus this role plus this telemetry gap equals an escape path."

The Hugging Face breach happened through a compound path. The post-mortem recommends governance, accountability, and incident response. Those are necessary. But the configuration that created the path is verifiable before the model runs and should have been verified.

The post-mortem recommends building the ability to mass-rotate credentials and designing for ephemeral credentials by default.

The configuration invariants behind that recommendation: Secrets Manager rotation is enabled AND the rotation Lambda actually exists. The second check matters, rotation can show as "enabled" in the console while the backing Lambda has been deleted. The secret hasn't changed in 120 days. The dashboard says 30. The ghost reference — a configuration that appears active but references a deleted dependency is one of the most common Tier 3 failure modes in cloud security.

IAM access key age verification. KMS automatic key rotation. ACM certificate expiry monitoring. Each is a configuration property that's verifiable and deterministic.

The post-mortem recommends adopting immutable infrastructure. Services that are destroyed and redeployed from known-good images rather than patched in place.

The configuration invariants: ECS tasks with read-only root filesystems. Lambda functions with code signing enforced. ECR repositories with tag immutability and image scanning enabled. EC2 instances with IMDSv2 enforced (preventing the trivial SSRF credential theft that's been a standard attack technique for years). ECS exec disabled in production.

These aren't new controls. They're standard cloud hardening. What's notable is how few organizations verify all of them simultaneously and how the compound check (exec enabled + writable filesystem + no signing = runtime modification with no integrity check) isn't in any benchmark.

The post-mortem surfaces a finding that should concern every security team: when Hugging Face's defenders tried to analyze the attack's 17,000 actions, the commercial models they reached for blocked their analysis. Real attack commands and exploit payloads triggered safety guardrails that couldn't distinguish an incident responder from an intruder.

The attacker was bound by no guardrail. The defenders were.

This is the inevitable consequence of prompt-level controls applied to infrastructure problems. A text filter that blocks "dangerous commands" can't tell whether the command is part of an attack or part of the investigation. The attacker doesn't use the text filter. The defender does.

Configuration verification operates at a different layer. It doesn't filter commands. It verifies that the infrastructure's configuration prevents the attack path from existing in the first place. The VPC either has unrestricted egress or it doesn't. The role either has a permission boundary or it doesn't. These checks don't trigger safety guardrails because they're not analyzing attack commands. They're verifying infrastructure state.

The post-mortem's "What a CISO Should Do Now" section lists 20 recommendations across three time horizons (this week, this month, this quarter). Most are process and governance. The configuration verification subset is smaller and more immediately actionable:

Verify sandbox isolation before deploying any AI agent or evaluation. Run the 5 network isolation checks against the actual VPC configuration. The check takes seconds. The breach took days to clean up.

Verify agent role scoping against the 7 identity invariants. Permission boundaries, session duration limits, session naming, source restrictions, PassRole scope, credential lifetime, and OIDC restrictions. Each is a configuration property the cloud provider exposes.

Verify compound paths, not just individual controls. The three-resource escape path that enabled the Hugging Face breach passes every individual check in every scanner on the market. The compound check which requires correlating resources across security groups, IAM roles, and telemetry configuration catches it.

Run these checks continuously, not once. Configuration drifts. A sandbox that was correctly isolated last month may have had its egress modified during a debugging session and never reverted. Continuous verification against the 32 invariants catches drift before a model finds it.

Every configuration invariant described in this article is verifiable against a live cloud environment using Stave, an open-source verification tool. The invariants span five clusters: sandbox network isolation (5), non-human identity scoping (7), credential rotation and ephemeral credentials (5), immutable infrastructure (6), agent telemetry (4), and compound cross-resource paths (5).

The atomic controls existed in the catalog before the Hugging Face incident was public. The compound chains that compose them into agent-specific escape, exfiltration, and bypass paths were authored in response to the CSA post-mortem. Because the cross-resource composition connecting them into compound findings hadn't been explicitly defined.

That distinction matters: the individual checks ("is egress restricted?" "is the role scoped?" "are flow logs enabled?") are table stakes. Every scanner has them. The compound check ("egress is unrestricted AND the role is broad AND flow logs are absent, together creating an escape path") cannot be produced by any single-resource scanner. Because it requires reasoning across resource types, not within them.

The model didn't outsmart the security controls. It walked through a configuration gap that nobody verified was closed. The gap is closed now. The 32 invariants verify it stays closed — every commit, every snapshot, every deployment.

Stave is open-source (Apache 2.0), runs locally, and requires no cloud credentials for evaluation. The agent isolation coverage audit and the 32 invariants referenced in this article are in the repository. Try it: stave apply --observations ./snapshots

The CSA/SANS/RSAC post-mortem, "Hugging Face Incident Initial Post-Mortem" (v0.8, July 27 2026), is available from the Cloud Security Alliance.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @openai 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/the-model-didn-t-esc…] indexed:0 read:10min 2026-07-29 ·