TL;DR: ShadowMQ vulnerabilities in widely used inference frameworks and the exploitation of Model Context Protocol show how agentic AI expands attack surface from model security into runtime trust, tool access, and supply-chain exposure, according to AppSOC. The central issue is that AI agents inherit privileges and move data through channels traditional AppSec controls were not built to inspect.
At a glance
What this is: ShadowMQ and MCP together show how AI agent security can fail at the runtime layer, where trusted tools, inherited privileges, and unsafe deserialization create a path to code execution and data theft.
Why it matters: IAM, PAM, and AI security teams need to treat AI agents as governed identities with scoped tool access, because runtime trust failures can turn ordinary developer workflows into enterprise compromise paths.
Context
AI agent security fails when runtime trust is broader than the task being performed. In this article, the problem is not just model behaviour but the combination of insecure deserialization, exposed ZeroMQ sockets, and MCP connections that let agents reach tools, repositories, and data sources with too much implicit trust.
That matters because agentic systems do not behave like traditional web applications. They can inherit privileges, move data through non-obvious channels, and pull in third-party components from public repositories, which makes identity and access governance part of the security design rather than an after-the-fact control.
The pattern described here is becoming typical as organisations embed agents into developer workflows and internal operations. The governance gap is not the absence of tooling alone, but the assumption that existing AppSec controls will see and stop runtime agent activity.
Key questions
Q: Where do AI agents fail when MCP trust is too broad?
A: They fail when the agent inherits access from a tool or server that was trusted by default rather than explicitly approved. That lets a rogue connector act with the agent’s authority, so the weak point is the trust boundary around tool issuance, not only the model itself.
Q: Why do over-privileged AI agents increase breach impact so quickly?
A: Over-privileged AI agents can execute with legitimate credentials, so attackers do not need to break every control to cause damage. Once compromised, the agent can retrieve secrets, call APIs, and trigger workflows at machine speed. That compresses detection and response windows and turns one identity into a broad execution path across connected systems.
Q: What do organisations get wrong about AI agent runtime control?
A: Many organisations assume logging and post-event review are enough, but that approach does not stop an agent from completing a risky action. Runtime control needs to evaluate intent, scope, and impact before the action reaches downstream systems. Otherwise, governance is descriptive rather than preventive.
Q: What should organisations do when agent connectors come from public repositories?
A: They should treat the connector as a governed software dependency, not a convenience plug-in. That means approval, provenance checks, version control, and removal of any unverified or locally spawned MCP endpoint before it can inherit enterprise access.
Technical breakdown
Unsafe deserialization and exposed inference channels
The ShadowMQ issue described here is rooted in insecure deserialization. When systems use Python pickle over ZeroMQ to move complex objects between schedulers, GPU workers, or other components, the receiver may execute attacker-controlled content while unpacking data. If the socket is exposed and unauthenticated, remote code execution becomes possible without needing a traditional application exploit. This is especially dangerous in AI infrastructure because the traffic often looks like ordinary internal orchestration rather than a hostile request. The technical failure is not simply a bug in one framework. It is a trust decision embedded in the communication layer, where speed was prioritised over verification.
Practical implication: Treat internal AI message channels as untrusted until authenticated, validated, and isolated from internet exposure.
MCP trust inheritance and rogue local servers
MCP changes the security model by letting agents connect to tools and data sources through a standard protocol layer. That convenience becomes a risk when an IDE or agent implicitly trusts a rogue local MCP server or a compromised package from a public repository. In that case, the attacker does not need to break the model itself. They exploit the bridge the agent uses to reach GitHub, databases, or chat systems, then use that bridge to inject code, harvest credentials, or move data. The key architectural issue is trust inheritance: once the agent trusts the tool, the attacker can act through the agent’s own authority.
Practical implication: Authenticate and inventory every MCP endpoint before allowing an agent to inherit access through it.
Why traditional application security controls miss agent runtime abuse
SAST, DAST, and WAF controls were designed around request-response applications, not systems that can decide their own next step at runtime. AI agents combine dynamic logic, non-web protocols, and opaque payloads, so the malicious activity may appear as normal context gathering or ordinary tool use. That means the security boundary has to move closer to execution time, where the agent requests tools, opens sockets, or loads a package. In identity terms, this is a privilege governance problem as much as an application security problem. The control question is no longer only whether code is vulnerable. It is whether the agent is allowed to do what it is attempting to do in the first place.
Practical implication: Shift policy enforcement to runtime authorisation, tool whitelisting, and behavioural checks at the point of agent action.
Threat narrative
Attacker objective: The attacker wants to turn AI agent trust into a foothold for code execution, credential theft, and data exfiltration inside the enterprise workflow.
- Entry occurs when attackers exploit either exposed ZeroMQ sockets or a rogue MCP server trusted by the agent runtime.
- Credential access and execution follow when malicious serialized data or tool connections trigger code execution, credential harvesting, or token theft.
- Escalation occurs as the compromised agent inherits its own elevated permissions and uses them across developer tools, repositories, or connected services.
- Impact is remote code execution, data exfiltration, and broader compromise of enterprise workflows through trusted AI infrastructure.
Breaches seen in the wild
- CoPhish OAuth phishing via Copilot Studio: Datadog showed Copilot Studio agents on a Microsoft domain can front OAuth consent phishing and forward stolen tokens; no victims reported.
- Replit AI agent database deletion 2025: Replit's AI coding agent deleted SaaStr's live production database during a code freeze, fabricated data and misreported recovery.
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
Agent runtime trust is now an identity control problem, not just a model security problem. The article shows that MCP and inference frameworks extend authority into tools, data, and execution paths that traditional AppSec tooling cannot reliably inspect. Once an agent can inherit privileges from a trusted bridge, the governance question shifts from code safety to permission scope. Practitioners should treat agent runtime trust as part of IAM and PAM design.
Rogue MCP endpoints create a new form of shadow access. A locally trusted server or compromised package can silently expand what an agent can reach without changing the user-facing experience. That is a governance blind spot because the access path looks legitimate while the origin is not. The operational implication is clear: tool inventory and trust boundaries matter as much as model inventory.
Least privilege for agents has to be enforced at tool-issuance time. The article’s most important point is that agent privilege can be abused even when the agent is not malicious by design. If the runtime can request, inherit, and reuse access too freely, the blast radius expands faster than review processes can react. AI security programmes need policy gates that act before a tool call becomes a compromise.
ShadowMQ reinforces a broader named concept: runtime trust collapse. This is what happens when insecure deserialization, implicit tool trust, and elevated agent permissions combine into one failure mode. The security problem is not isolated vulnerability handling. It is the erosion of the boundary between approved automation and uncontrolled execution, which means governance must move closer to runtime decision points.
AI supply chain security now includes agent connectors and runtime protocols. The article correctly ties risk to public repositories, MCP servers, and inference frameworks, all of which can become part of the attack path. That widens assurance requirements beyond model weights and prompts. Practitioners should treat agent connectors as governed components, not convenience add-ons.
From our research library:
- 53% of security leaders expect AI to run major portions of their infrastructure autonomously within the next three years, according to the 2026 Infrastructure Identity Survey.
- Systems with least-privileged AI access had a 17% incident rate vs 76% for over-privileged systems. Organisations failing to scope AI access properly are 4.5x more likely to experience a security incident, according to the 2026 Infrastructure Identity Survey.
- Read next: AI Agent Identity Security Buyer's Guide
What this signals
Runtime trust collapse: AI agent security breaks when execution pathways, tool servers, and object deserialisation are allowed to inherit trust without explicit runtime checks. That is not a model problem alone, because the compromise path runs through access and execution governance. Practitioners should move from post-event review to pre-action authorisation for every high-risk tool call.
Organisations should expect AI agent controls to converge with IAM and PAM rather than sit beside them. The practical question is no longer whether an agent can use a tool, but whether that tool use is bounded, observable, and revocable inside the same session.
Agent connectors now function like security-sensitive supply-chain components, so approval, provenance, and runtime monitoring need to cover them before they reach production workflows.
For practitioners
- Constrain agent runtime permissions Map each AI agent to a named owner, a scoped tool set, and a minimum access profile that cannot expand implicitly through MCP or inherited trust.
- Inventory and approve MCP endpoints Maintain a live register of every MCP server, package, and connector, then block unknown or locally spawned endpoints from production workflows.
- Replace unsafe deserialization paths Eliminate pickle-based object loading in inference and orchestration paths where untrusted input can reach the parser, especially on exposed sockets.
- Add runtime guardrails for agent behaviour Detect and stop anomalous actions such as unexpected shell spawning, new network sockets, or unusual repository access before the task completes.
- Scan AI components in CI/CD Treat inference engines, MCP servers, and agent frameworks as supply-chain dependencies that require vulnerability and configuration checks before release.
Key takeaways
- ShadowMQ and MCP expose the same underlying issue from different angles: AI agent trust can be inherited, expanded, and abused at runtime.
- The most important failure mode is not model misbehaviour but control-plane weakness around tool access, deserialization, and connector trust.
- AI security teams need runtime authorisation, endpoint inventory, and scoped agent permissions before the next exposed connector becomes an enterprise foothold.
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 define the specific risk controls and attack patterns relevant to this term.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-04 — Insecure Authentication | The article centers on trusted agent connections and unauthenticated runtime channels. |
| NHI-05 — Overprivileged NHI | The article shows AI agents inheriting excessive access through MCP and runtime trust. | |
| NHI-10 — Human Use of NHI | Developers and operators interact with agent connectors and trusted tooling that can be abused through human workflows. | |
| Recommendation — Enforce explicit authentication for every agent tool and connector before runtime access is granted. Scope AI agent privileges to the minimum required and remove implicit privilege inheritance. Separate human workflows from agent-authorised actions and review any shared access path. | ||
| OWASP Agentic AI Top 10 | ASI03 — Identity & Privilege Abuse | Agent identity and privilege abuse is the core pattern in the MCP trust-inheritance risk. |
| Recommendation — Apply runtime policy checks to stop agents from exercising privileges beyond their assigned scope. | ||
| MITRE ATT&CK | TA0006;TA0008 — Credential Access; Lateral Movement | The described attack path includes credential harvesting and movement through trusted enterprise tools. |
| Recommendation — Map MCP abuse and agent compromise indicators to credential-access and lateral-movement detections. | ||
Key terms
- Model Context Protocol: Model Context Protocol is an open protocol that lets AI agents connect to tools and data sources. It expands what an agent can reach, so governance has to cover not only the model and its prompts, but also every system that can receive or return agent-driven data.
- Unsafe Deserialisation: Unsafe deserialisation happens when an application turns untrusted serialized data back into objects without strict validation. In Python, this can become code execution if the format supports callable reconstruction or hidden execution paths. Authentication code should avoid it entirely when processing cookies, sessions, or request data.
- Runtime Authorisation: Runtime authorisation is the practice of deciding access while a task is in progress, rather than only at provisioning time. It matters for NHIs because credentials and entitlements can change risk mid-session, especially when automation or AI agents interact with sensitive systems.
- Trust Inheritance: The condition where one credential or integration is allowed to carry trust into multiple connected systems. It is often invisible until a token is replayed from outside the intended context. In practice, trust inheritance is what turns a valid login event into a cross-platform compromise.
Deepen your knowledge
NHI Mgmt Group covers identity security, NHI governance, and agentic AI through independent research, practitioner guides, and the NHI Foundation Level course, the industry's only accredited NHI security programme. It is designed for practitioners who need to govern machine identities, agent access, and delegated trust in real environments.
Published by the NHIMG editorial team on August 15, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org