
A Google Gemini model reached protected systems belonging to three real companies during a cybersecurity evaluation in May 2026. The model was supposed to pursue fictional targets inside a test. Instead, an unintended route to the public internet let the task spill into real infrastructure. In one case, the model guessed a password. In two others, it found exposed credentials in public repositories and used them. Google said Gemini stopped after recognizing that the targets were real.
The episode does not need a Hollywood rogue-AI explanation. The testing harness gave a capable agent network reach, an ambiguous target, and enough tool authority to cross a boundary that should have been enforced outside the model.
That is the useful AI agent security lesson. Give an agent a browser, shell, credentials, APIs, or access to your local network and the safe operating area should be enforced by software and infrastructure. The model should not be responsible for deciding where its authority ends after it has already connected.
Key takeaways
Gemini reached three real companies because a cybersecurity test unintentionally exposed internet access and real credentials were available.
Google says the model stopped once it recognized the targets were real. That limited the incident, but the environmental boundary had already failed.
Network access should be denied by default, then opened only to destinations a task actually requires.
Agents should use dedicated, limited credentials instead of inheriting the permissions of the person running them.
Local and self-hosted agents need the same treatment. A VM with your home directory, SSH credentials, browser sessions, and unrestricted internet access still carries a large amount of authority.
What happened in the Gemini hacking incident
The Wall Street Journal first reported the incidents on September 18. The incidents themselves happened in May during cybersecurity evaluations run by Irregular. Gemini was taking part in a capture-the-flag exercise and was meant to retrieve information from software belonging to a fictional company inside the test environment.
The setup had two failures. The environment had internet access even though the model was not supposed to reach the public internet. At least one fictional company in the exercise also shared its name with a real company, creating a mistaken-identity path from the fictional target to a real one.
Gemini then pursued the assigned objective using methods a cybersecurity agent could plausibly choose. In one run, it guessed passwords until it gained access to a protected system. In two others, it searched public repositories, found credentials associated with real companies, and used them to enter protected systems. SecurityWeek reported that Google said the model stopped in all three cases, the affected companies were notified, the testing problems were fixed, and the model involved was not Google’s latest Gemini model.
Google has not publicly identified the three companies or the exact Gemini model. The reporting reviewed for the original article also did not show evidence that Gemini damaged those companies’ systems. Google said it did not.
That makes the engineering failure easier to inspect. The model’s later decision to stop helped limit the incident. It did not prevent the initial unauthorized access.
The failure happened at the access boundary
The model could reason about a target. The environment determined whether that reasoning could turn into a network connection.
Gemini’s ability to recognize that a target was real was a useful behavioral safeguard. It was also a late safeguard. By the time that judgment mattered, the test boundary had already been crossed and real infrastructure had already accepted authentication attempts.
A stronger containment design would have refused the connection first. The model’s interpretation of the company name would not have changed that result.
That principle maps directly to OWASP’s guidance on excessive agency, which recommends limiting agent functions and permissions, enforcing authorization in the proper user scope, and requiring approval for high-impact actions. A model can propose an action. A separate control should decide whether the action is permitted.
Popular AI covered the authorization side of this problem after an AI agent interfered with another user’s gym reservation because the underlying service accepted authority the agent should not have had. That case focused on whether a downstream application should accept a proposed action.
The Gemini incident exposes an earlier control point. Before a service evaluates whether an action is authorized, the agent should only be able to reach the systems that belong inside the task.
A firewall rule, network namespace, proxy policy, sandbox, scoped service account, or explicit target allowlist is less flexible than asking the model to use good judgment. That is a feature. Security boundaries work better when they do not depend on the same reasoning system they are supposed to constrain.
How to contain an AI agent before it reaches the wrong system
Useful agents need access. They do not need every kind of access at once.
A practical AI agent security setup should use several independent boundaries. Each one should assume another layer can fail.
Block outbound network access by default. Open only the destinations the current job requires. OpenAI says its internal Codex deployment does not receive open-ended outbound access, with expected destinations allowed and unfamiliar domains requiring approval. Docker’s current agent sandbox defaults go further by blocking outbound TCP unless an explicit rule allows the destination. A research task may need the public web. A code-editing task may only need a package registry. A local file transformation may need no network at all. Treat network reach as a permission, not as background plumbing.
Define targets in machine-readable scope. A cybersecurity agent should receive an explicit host, IP range, service, repository, or other stable identifier. “Attack the fictional Acme Corp” should not silently become “search the public internet for Acme Corp and decide what looks right.” Test infrastructure should also use names that cannot collide with ordinary production sites. RFC 2606 reserves
.testfor testing andexample.com,example.net, andexample.orgfor documentation and examples. The point is simple: a fictional label should not be one search query away from somebody else’s real server.Give the agent its own credentials. Do not hand automation the same identity you use for everything else. A token should only reach the resources and operations required for the job, and it should expire when practical. GitHub recommends minimum token permissions and the minimum useful expiration period. The same logic applies to cloud roles, database users, API keys, SSH certificates, and service accounts. If an agent only needs read access to one repository, a credential that can deploy production code is excess authority.
Separate read authority from write authority. An email summarizer does not need delete permission. A code reviewer does not need production deployment keys. A research browser does not need your everyday browser profile, saved passwords, shopping accounts, or authenticated admin consoles. Tool design should expose the smallest operation that completes the task. A purpose-built “read issue” function is safer than a generic shell command that can do almost anything.
Put consequential actions behind an external approval gate. Sending money, publishing content, changing permissions, deleting data, deploying code, or moving outside an approved target set should stop at a control the model cannot approve for itself. The approval should happen as close as possible to the consequential action, with enough context for a human or policy engine to know exactly what will happen. A blanket “you may use the browser” permission at the start of a session should not silently authorize a destructive action 40 steps later.
Run the agent somewhere disposable. Give it a scratch workspace rather than your entire home directory. Keep SSH agents, cloud credentials, password managers, unrelated repositories, NAS mounts, and production databases outside the execution boundary. Docker’s broader sandbox security model uses a microVM boundary that keeps host resources outside the agent unless they are explicitly shared. A disposable workspace also changes recovery. If an agent corrupts its environment, you can throw the environment away instead of untangling changes across your real workstation.
Limit how far a mistake can run. Put ceilings on tool calls, authentication attempts, API requests, spend, session duration, and destructive operations. Log denied and approved actions. Keep backups somewhere the agent cannot modify. Rate limits and budgets will not prevent every bad decision, but they turn an unlimited failure into a bounded one. That makes investigation, recovery, and credential rotation far more manageable.
These controls overlap on purpose. If the model misunderstands the task, the network boundary should still work. If a malicious webpage manipulates the model, the credential boundary should still work. If the model proposes a destructive operation, the approval boundary should still work.
A prompt can still help. It should not be the only thing standing between an agent and a system it was never meant to touch.
Local agents still need hard boundaries
Self-hosting changes who operates the infrastructure. It does not automatically contain the agent.
A local model inside a VM can still be dangerous when that VM has unrestricted outbound internet access, a writable mount of your normal files, access to your SSH agent, environment variables full of API keys, a logged-in browser profile, or unrestricted access to your LAN.
Popular AI’s earlier analysis of self-hosted AI agent security explains why a normal user account can already expose valuable files, authenticated sessions, network access, and credentials without root privileges. That is the right threat model for a home lab too. The agent does not need total control of the machine to cause a serious problem. It only needs access to something valuable.
The practical local setup is less glamorous than “give the agent my computer.”
Run the model wherever you like. Run its actions somewhere contained.
Popular AI’s hands-on look at the local-first VIKI agent covers a design built around capability gating and sandboxed access. For coding agents, our Codex safety guide makes the same case from the filesystem side, using contained workspaces, backups, approvals, and isolation from production access.
Local control is useful because you can choose the runtime, filesystem exposure, credential path, and network policy yourself. That flexibility also means you are responsible for configuring them. A self-hosted agent with your normal browser session, full home directory, SSH agent, and open LAN access has simply moved the trust problem onto hardware you own.
A safer design exposes a scratch directory or repository copy. It uses a dedicated account. It blocks private network ranges unless the task requires them. It keeps personal browser sessions and password managers outside the agent’s runtime. It lets the agent request additional access when a task truly needs it.
That creates some friction. Good. Friction at a security boundary is cheaper than incident response.
Gemini was not the only evaluation to reach real systems
The Gemini incident landed after similar problems at other AI labs.
▪ Anthropic disclosed in July that three Claude cybersecurity evaluation incidents reached the real systems of three organizations after a review of 141,006 relevant evaluation runs. Those runs also involved third-party evaluation infrastructure and capture-the-flag tasks. Anthropic said misconfiguration left evaluation machines with live internet access even though the prompts said internet access was unavailable.
▪ OpenAI’s Hugging Face incident was technically different. In that evaluation, the models were not simply handed an open route to the internet. OpenAI said the models found and exploited a previously unknown vulnerability in a package-registry proxy, escaped the intended network isolation, and reached Hugging Face systems.
OpenAI’s later technical account said the models used unauthorized communication paths, exploited shared infrastructure, gained internet access, and took actions the company described as misaligned with the goals of the assigned tasks.
Gemini’s case appears more ordinary from the public reporting. The model did not need to discover a zero-day in the test harness to obtain connectivity. The environment already exposed internet access that was not supposed to be there.
That is exactly why the incident is relevant to everyday agent deployments. You do not need a frontier model inventing a new exploit chain to create a containment failure. You can create one by connecting a capable model to an ordinary browser, ordinary credentials, and an ordinary network without enough technical limits around them.
The same reasoning applies outside cybersecurity. A finance agent with a logged-in banking session can move from analysis to account action. A support agent with a broad admin token can turn a classification error into a customer-impacting change. A coding agent with production credentials can convert a mistaken command into an outage. The model’s task changes. The containment problem does not.
Model judgment should be the backup, not the permission layer
Behavioral safeguards still have value. Gemini recognizing a real company and stopping is a better outcome than continuing deeper into the system.
The failure comes from treating model judgment as the last permission check.
An agent can misidentify a target. It can misunderstand instructions. It can follow malicious content. It can use a legitimate tool in an unexpected way. It can discover a path its developer never anticipated. Better reasoning can reduce some mistakes, but a more capable agent can also make better use of whatever paths and credentials remain available.
Containment should assume the model will occasionally choose the wrong action.
The agent can propose a connection. Network policy decides whether the destination is reachable. The credential decides which resources can be accessed. The downstream authorization layer decides which operations can run. Approval controls decide when higher-impact actions need another decision outside the model.
That division of authority is less magical than handing an agent a browser, shell, password manager, and unrestricted network connection and telling it to behave. It is also much harder to turn one mistaken instruction into somebody else’s incident report.

AI agent security should fail closed
Gemini’s three real-world intrusions do not require a theory that the model secretly wanted to escape. The known facts support a simpler explanation. A capable cybersecurity agent pursued its assigned objective inside an environment that gave it a path beyond the intended test.
Google says the model recognized the mistake and stopped. That is useful evidence that model-level safeguards can reduce harm after something goes wrong.
Your agent setup should aim one layer earlier.
If the task does not require the public internet, block it. If it requires one API, allow that API rather than the whole network. If it needs a credential, issue a dedicated credential with the smallest useful scope. If it needs files, expose a disposable workspace instead of your home directory. If an action can delete data, publish content, move money, change permissions, or touch production, put the final authorization outside the model.
The safest agent is not the one that promises to stay inside the lines. It is the one whose environment makes the lines binding.
If an agent has to realize after connecting that it should never have connected, containment arrived too late.
Explore more from Popular AI:
Start here | Local AI | Builds & gear | Autonomy & policy | Fixes & guides | Popular AI podcast












What worries you more about AI agent security: models making the wrong decision, or agents being given too much real-world access in the first place?