By NHI Mgmt Group Editorial TeamBased on Capsule: “GhostSquatting: Model Theft and RCE via Abandoned Names in AI Agent Files” (October 6, 2026)

TL;DR: AI-agent instruction files commonly point to abandoned buckets and unregistered packages, letting whoever claims a vacant name inherit agent traffic, data uploads, and install execution, according to Capsule. The control gap is name ownership, not model intelligence: agents cannot safely recover from missing references if the fallback path can be hijacked.


At a glance

What this is: This is a Capsule investigation into ghostsquatting in AI agent files, where abandoned bucket names and package references are claimed and then used to capture agent traffic, data uploads, and install execution.

Why it matters: It matters because agent instructions often run unattended and treat names as trustworthy, so unresolved references can become a path to data exposure and code execution across multiple organisations.


Context

Ghostsquatting in AI agent files is a naming and governance problem: an instruction file points to a bucket, package, or endpoint that no longer exists, was never registered, or lives in the wrong place, and the agent keeps going when the reference fails. In that failure mode, the unresolved name is not a harmless typo. It becomes an opening for someone else to claim the name and receive the traffic intended for the original destination.

The identity governance issue is that agent instructions are often treated as setup artefacts rather than executable control points. Once an agent file includes a bucket name, package name, or MCP reference, that reference becomes part of runtime behaviour, which means ownership, inventory, and offboarding need to be managed as living controls, not documentation chores.

In this article's case, the dangerous condition is not just exposed credentials or vulnerable code. It is the assumption that an agent can safely self-correct around a missing dependency or storage target, even when the fallback target can be claimed by an outsider.


Key questions

Q: What breaks when an AI agent instruction file references a bucket or package name that no longer exists?

A: The agent may keep running, but its fallback path becomes the security problem. If someone else can register the vacant name, the agent can send uploads, downloads, or install requests to an attacker-controlled destination. That turns a missing dependency into a data exposure or code execution path.

Q: Why do abandoned bucket names and dangling packages create such high risk in agent workflows?

A: Because the agent treats the reference as authoritative at runtime. A missing name is not just a configuration error if the system can recover by resolving the name elsewhere. The risk is that trust shifts from the original owner to whoever claims the namespace first, which is a governance failure, not a tooling quirk.

Q: How should teams prevent AI agents from using unowned storage or package destinations?

A: They should maintain an authoritative inventory of every external destination in agent files, verify ownership before execution, and block any unresolved reference. For install paths, they should also pin sources and signatures so a claimed package name cannot be substituted into the runtime.

Q: What is the difference between a harmless config typo and a takeover risk in agent files?

A: A harmless typo stays local when the system stops on error. A takeover risk appears when the agent or pipeline continues by trusting a public namespace that someone else can claim. In that case, the error becomes a route for data exfiltration, poisoned downloads, or remote code execution.


Technical breakdown

Why abandoned names become a runtime control point

AI agent instruction files blur the line between configuration and execution. A bucket name, package name, or registry reference is not merely descriptive when an agent uses it to decide where to upload, what to download, or what to install. If that name is unclaimed, deleted, or misrouted to the wrong cloud, the agent can be redirected without any change to the code that invoked it. The security problem is the trust placed in name resolution itself, especially when the agent is built to keep working through errors instead of stopping on them.

Practical implication: Treat every external name in agent files as executable input and fail closed when the destination is not owned and verified.

How bucket shadowing turns into data theft

Bucket shadowing works because object storage namespaces are easy to reference and hard to notice when they fail. If an instruction file points to a bucket that no longer exists or never existed, a new owner can register the name and start receiving the requests meant for the original target. In the article's example, that meant pipelines uploaded model weights, backups, and other files into storage controlled by the researcher. The mechanism is simple but dangerous: the agent trusts the name, not the relationship behind the name.

Practical implication: Inventory every storage name referenced by agent workflows and ensure each one resolves to a bucket you control.

Why package-name takeover can become remote code execution

Package-based ghostsquatting is more severe because the reference often sits directly inside an execution command such as npx, uvx, or pip install. If the package does not exist, or if the name points to an unclaimed registry entry, the first party to publish under that name can deliver code into the agent's runtime path. That is why the article ties this pattern to both silent installation and possible code execution. The security boundary is not the package manager alone. It is the assumption that the requested name is already authoritative.

Practical implication: Pin package sources, verify registry ownership, and block any agent command that resolves to an untrusted package name.


Threat narrative

Attacker objective: The attacker wants to intercept agent traffic, exfiltrate sensitive files, or deliver code through a name the agent was instructed to trust.

  1. Entry occurs when an AI agent instruction file references an abandoned bucket name or unregistered package name that a third party can claim.
  2. Credential or resource abuse follows when the agent resolves the name and sends uploads, downloads, or install requests to the attacker-controlled destination.
  3. Impact appears as stolen data, poisoned downloads, or code execution inside the pipelines that trusted the instruction file.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Ghostsquatting is an offboarding failure, not a curiosity about naming hygiene: When an AI agent file keeps pointing at a bucket or package that no longer exists, the control failure is lifecycle management, not model quality. The unresolved reference can outlive the project, the team, or the cloud environment that created it. Practitioners should treat abandoned names as standing attack surface, not dead configuration.

Name resolution has become an identity boundary for agentic workflows: In these systems, the agent does not just read a file. It executes the file's references as if they were trusted instructions. That means ownership of buckets, registries, and MCP-adjacent references now sits in the same risk conversation as authorisation and privilege. Security teams need to recognise that a claimed name can be as dangerous as a stolen secret when the runtime automatically follows it.

Abandoned reference trust debt: This article surfaces a class of exposure where the organisation assumes a missing dependency is harmless because the agent will adapt. That assumption fails when someone else can step into the vacant namespace and receive the same traffic, data, or install request. The implication is that agent governance must include authoritative ownership checks before any instruction is allowed to resolve externally.

Agent files should be governed like executable supply-chain artefacts: Skills, CLAUDE.md files, AGENTS.md files, and MCP configs are not passive documentation when they can trigger network egress and installation. The security model needs to cover ownership verification, registry provenance, and explicit failure on unresolved references. Practitioners should classify these files as runtime control surfaces and review them accordingly.

Cross-cloud misrouting is a governance error that looks like a technical typo: The article shows that an instruction written for one storage system can silently redirect to another when the agent uses the wrong default command or namespace. That is not just an integration issue. It is a failure of environment isolation and destination governance, and it creates room for data to cross organisational boundaries without any visible compromise. Teams should verify that every agent-destination pair is bound to the intended environment.

From our research library:

What this signals

Abandoned reference trust debt: Agentic workflows expose a governance gap that most IAM programmes have not modelled: the system can keep functioning even when the referenced destination is missing. That means the control point moves from the request itself to the ownership of the name, and unresolved names must be treated as high-risk assets, not tolerable fallbacks.

When instruction files can trigger uploads and installs, the boundary between configuration and execution collapses. Practitioners should expect more abuse of public namespaces, especially where teams leave cloud bucket names, package names, or MCP references undocumented and unclaimed. The operational answer is to bind agent egress to owned destinations and stop anything else at runtime.


For practitioners

  • Audit agent instruction files for external names Inventory every bucket, registry, and endpoint referenced in skills, MCP configs, and agent templates, then verify that each name resolves to a resource you control.
  • Fail closed on unresolved destinations If a referenced bucket, package, or registry entry does not resolve to an owned target, stop execution rather than letting the agent self-correct to whatever name is available.
  • Pin and checksum runtime dependencies Require explicit source pinning for npx, uvx, pip, and similar install paths so a claimed package name cannot be substituted into the agent runtime.
  • Register and retain your external bucket names Reserve cloud storage names that appear in production agent files even if the bucket is temporarily unused, so an outside party cannot claim them later.
  • Review agent files as executable controls Treat CLAUDE.md, AGENTS.md, .cursorrules, and related instruction files as code paths that can move data or launch commands, not as documentation that can be left stale.

Key takeaways

  • Ghostsquatting in AI agent files turns abandoned names into an execution path that attackers can claim before the original owner notices.
  • The article shows live traffic flowing to claimed buckets and package names, including uploads of model weights, backups, and install requests.
  • Teams need ownership checks, fail-closed resolution, and runtime blocking for unverified destinations if they want to keep agent workflows safe.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10, OWASP Agentic AI Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-03 — Vulnerable Third-Party NHIThe article shows abandoned external names being claimed and used against agent workflows.
NHI-04 — Insecure AuthenticationRuntime trust is placed in names that may no longer belong to the intended owner.
NHI-07 — Long-Lived SecretsThe article's core failure is stale references persisting long after ownership changed or disappeared.
Recommendation — Inventory every referenced bucket, registry, and endpoint and remove third-party dependencies you cannot verify. Require verified ownership before an agent can authenticate to any external destination. Eliminate stale agent references and rotate destinations whenever ownership or environment changes.
OWASP Agentic AI Top 10ASI02 — Tool MisuseAgents are instructed to use tools and destinations that can be hijacked through bad references.
Recommendation — Constrain agent tool use to approved destinations and block fallback resolution to public namespaces.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementThe article centres on control of credentials and runtime access paths tied to external resources.
Recommendation — Manage credential and dependency lifecycles so agent access paths cannot persist beyond ownership changes.
MITRE ATT&CKTA0006;TA0008 — Credential Access; Lateral MovementClaimed names let attackers intercept requests and move from reference abuse into broader compromise.
Recommendation — Map hijacked-name activity to credential access and lateral movement detections in your monitoring stack.

Key terms

  • Ghostsquatting: The capture of an abandoned or unclaimed name that an AI agent or automated workflow still trusts. In practice, this can redirect uploads, downloads, or installs to an attacker-controlled destination because the runtime treats the name as authoritative.
  • Dangling Reference: A configuration entry that points to a bucket, package, registry, or endpoint that no longer exists or is no longer owned as intended. In agent workflows, dangling references are dangerous because the system may recover by resolving the name somewhere else.
  • Environment Isolation: Environment isolation is the practice of keeping development, test, and production access separated so compromise in one zone does not automatically reach another. For machine identities, weak isolation usually means the same credential or trust relationship can cross boundaries and enlarge the blast radius.
  • Runtime Execution Command: A command that causes code to run immediately, such as an install or launcher invocation inside an agent file. In AI agent contexts, these commands are especially sensitive because they combine instruction, retrieval, and execution in one step.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on October 11, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org