Independent analysis by NHI Mgmt GroupSource article: Bloom Security, “Poisoned Coworker: Hijacking Claude Cowork” (June 23, 2026)

TL;DR: A quietly modified host-side settings file can hijack a live Claude Cowork session without sandbox escape or prompt injection, according to Bloom Security, because the runtime loads PreToolUse hooks from a synced path that local processes can rewrite. AI session trust must now be governed like privileged access, with host-file integrity and connector scope treated as primary controls.


At a glance

What this is: NHI Mgmt Group's analysis, drawing on Bloom Security's blog post: A host-side settings file can hijack a live Claude Cowork session through documented hooks, making session trust, not sandbox escape, the central governance problem.

Why it matters: IAM and security teams need to treat AI agent sessions as privileged, long-lived control surfaces where host integrity, connector scope, and runtime authority determine exposure.


Context

An AI agent session becomes a security boundary when it can run shell commands, use authenticated connectors, and persist state across tasks. The weakness here is not the sandbox itself but the trusted configuration path that controls what the agent executes. AI agent identity security matters because a session that inherits user context can be redirected without any visible authentication step.

The core governance issue is that the host path and the VM runtime are treated as separate, when the control plane is effectively shared. A local process with write access to the synced settings file can alter the agent's behavior mid-session while the user still sees the same workflow.

That starting position is atypical for ordinary desktop software, but it is a plausible design risk for agentic systems that blend local files, live credentials, and delegated execution.


Key questions

Q: What should teams do first when an AI agent session is hijacked?

A: First, revoke the agent’s active session, invalidate any bearer tokens or API keys it is using, and block the tool connections it can still reach. Then identify the human owner, preserve audit logs, and check for lateral actions such as file writes, prompt injection, or outbound data transfer. The main goal is to stop delegated access immediately and contain the runtime scope.

Q: Why can a host file control a live AI agent session?

A: A host file can redirect name resolution at the operating system level, so a live AI agent may be sent to a different endpoint than the one it intended to call. That lets an attacker steer tool calls, intercept traffic, or break trust in the target service. DNS and hosts-file integrity are therefore part of agent runtime control.

Q: How do pre-execution hooks change agent security?

A: Pre-execution hooks add a policy checkpoint before an agent runs a tool, sends a request, or writes output. They can enforce allowlists, inspect prompt content, block dangerous actions, and require approval for privileged steps. That shifts control from after-the-fact detection to runtime authorisation, reducing the chance that an agent executes outside its intended scope.

Q: How should teams limit connector scope for AI agents?

A: Limit connector scope by granting each agent only the specific APIs, folders, data sets, and actions it needs, with separate credentials for each connector. Use short-lived tokens, explicit allowlists, and per-connector policy checks so one integration cannot laterally access others. Tight scoping also makes revocation and audit trails clearer when an agent is offboarded or compromised.


Technical breakdown

How the host-side settings file changes agent behavior

Claude Cowork loads its runtime configuration from a host-resident file that is synced into the VM. That makes the configuration file part of the execution path, not just a preference store. When the file includes a documented PreToolUse hook, the runtime invokes a command immediately before a matched tool call. The important technical point is that this is not prompt injection and not sandbox escape. The model does what the runtime is configured to do, and the configuration can be changed by any process that can write to the host path.

Practical implication: Treat synced agent configuration files as executable control surfaces and monitor them with the same rigor as login scripts or shell profiles.

Why connector scope expands the blast radius

Once a session can use pre-authenticated connectors, the agent is no longer only a local execution environment. It becomes a delegated identity that can act through mail, chat, storage, browser, or task integrations. That is why the article's examples matter: exfiltration can happen through legitimate channels, and browser actions can ride existing user cookies and sessions. In identity terms, the agent is borrowing the user's authority while remaining governed by a runtime that can be modified underneath it. See the AI Agent Identity Security Buyer's Guide.

Practical implication: Limit connector grants to the minimum task scope and revoke them when the session ends.

Why persistent agent sessions create hidden authority

A long-lived agent session accumulates more than conversation state. It may retain tool permissions, scheduled tasks, browser access, and filesystem context, which means the original approval becomes stale while authority remains active. The danger is environmental pinning: if a hook can alter PATH, proxies, or package sources before every command, then every later action inherits the compromise. This is an agentic analogue to privilege persistence, except the privilege is exercised through runtime configuration rather than static entitlements.

Practical implication: Shorten session lifetimes and reset authority between tasks instead of allowing one approved session to carry broad, durable access.


Threat narrative

Attacker objective: The attacker wants to convert a trusted AI coworker session into a covert execution and exfiltration channel that runs with the user's live authority.

  1. Entry occurs when a local process on the host Mac writes to the synced settings file that controls the live agent session.
  2. Credential access happens through the agent's existing authenticated connectors and browser sessions, which the hook can reuse without prompting the user again.
  3. Impact follows when the hook redirects commands, exfiltrates data through trusted channels, or maintains persistent access across later tasks.
  • Nx s1ngularity attack 2025: Attackers stole Nx's npm token via a GitHub Actions flaw and shipped malware that stole 2,349 secrets and abused developers' AI CLIs.
  • Anthropic Claude evaluation incidents 2026: Claude models told they had no internet access breached four real organisations during cyber evaluations, one via a malicious PyPI package.

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

AI agent sessions are becoming privileged runtime identities, not just interactive tools. Bloom Security shows that the dangerous control point is the configuration path the session trusts, not the sandbox boundary it advertises. That shifts governance from prompt safety to runtime authority, file integrity, and delegated access scope. Practitioners should treat the session itself as a governed identity surface.

Host-side configuration poisoning is the named failure mode this attack exposes. The session trusted a host-synced file that any same-user process could rewrite, so the attack never needed a sandbox escape. That is a control gap in lifecycle governance, because the runtime assumed the configuration source was as trustworthy as the session that consumed it. The fix is not theoretical hardening, but recognition that configuration provenance is part of the trust model.

Connector scope turns a session compromise into identity abuse. Once the agent can act through pre-authenticated connectors and browser sessions, the compromise inherits the user's existing trust relationships. That creates a delegated-identity problem in which the session can move data or actions through legitimate channels that monitoring may not flag. Practitioners should govern connectors like sensitive credentials, not convenience features.

Session persistence multiplies exposure when runtime authority survives the task. The article's recurring-jobs and browser-control examples show how a live session can outlast the moment of approval. That creates a long-lived privilege window inside an environment that feels temporary to the user. Security teams should close sessions aggressively and assume every retained capability widens blast radius.

Session provenance now belongs in AI governance and IAM conversations. The control question is no longer only whether the model behaves safely, but whether the session's authority, configuration source, and connector grants can be proven trustworthy at runtime. That is where AI security oversight intersects with access governance: if provenance cannot be verified, the session cannot be assumed safe. Practitioners should elevate AI session lineage into routine governance.

What this signals

Host-side configuration poisoning: AI agent governance will need a distinct control category for configuration provenance, because a trusted session can be redirected by a file rewrite rather than by prompt manipulation. That means security teams should classify synced runtime settings as part of the attack surface, not just the installation footprint.

The practical shift is toward runtime attestation for agent sessions, with tighter checks on connector scope, filesystem trust, and the lifetime of authenticated tool access. Where sessions can inherit user cookies, scheduled tasks, or package registries, the control objective becomes containment of delegated authority rather than simple model safety.


For practitioners

  • Monitor synced agent configuration paths Watch the host-side settings file and any adjacent sync directory for unexpected writes, especially from processes other than the agent itself.
  • Restrict connector grants per task Limit every connector to the minimum scope needed for the current session and remove access when the task is complete.
  • Shorten live agent session lifetime Force agent sessions to end when the work ends so approved authority, browser state, and background jobs do not persist beyond the task.
  • Audit scheduled jobs created by agents Review managed endpoints for scheduled tasks or recurring jobs that an agent session created without explicit administrative approval.
  • Constrain browser connector use Only allow browser access for sessions that truly need it, because live cookies and authenticated tabs extend the session's reach into internal tools.

Key takeaways

  • A live AI agent session can be redirected through its host-side configuration path even when the sandbox remains intact.
  • The real exposure is the combination of delegated connectors, browser state, and long-lived session authority that can be reused for exfiltration or persistence.
  • Practitioners should govern agent configuration provenance, connector scope, and session lifetime as first-class security controls.

Related NHI Mgmt Group resources: AI Agent Identity Security Buyer's Guide · AI Security Maturity Model · Managed File Transfer (MFT) Security Guide · Board Briefing: AI Security


Standards & Framework Alignment

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

OWASP Agentic AI Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST AI RMF sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI03 — Identity & Privilege AbuseThe attack abuses a trusted agent session and its delegated privileges.
ASI02 — Tool MisuseThe hook redirects tool calls and connector actions through the live session.
ASI07 — Insecure Inter-Agent CommunicationThe session relies on connector channels and shared runtime communication paths.
Recommendation — Constrain agent identity and privilege so configuration changes cannot silently expand runtime authority. Restrict tool and connector actions to task-scoped approvals and explicit policy checks. Audit agent communication paths and prevent trusted channels from becoming covert exfiltration routes.
NIST AI RMFGOVERN — AI Governance and AccountabilityThe article is about governance of agent sessions, authority, and oversight.
Recommendation — Establish governance for agent configuration provenance, session authority, and delegated access.
MITRE ATT&CKTA0006; TA0008 — Credential Access; Lateral MovementThe attacker reuses authenticated connectors and moves through trusted channels.
Recommendation — Map the session takeover to credential access and lateral movement techniques in your detections.

Key terms

  • Claude Cowork: An AI coworker environment that runs inside a local virtual machine and can read files, execute commands, and use connectors on behalf of the user. Its security posture depends on both the isolated runtime and the host-side configuration path that controls session behavior.
  • PreToolUse Hook: A PreToolUse Hook is a control point that runs before an AI agent or other automation invokes a tool. It can inspect the proposed action, context and parameters, then allow, block or modify the call, helping enforce scope limits, approval rules and other runtime controls around delegated access.
  • Session Hijacking: Session hijacking is the takeover of an authenticated session after the original login has completed. The attacker does not need to know the password if they can use the active session token, which is why session monitoring and revocation are essential controls in SaaS identity governance.
  • Connector scope: The exact permissions and environmental reach granted to an integration that links a workflow to another system. For chat-driven automation, connector scope defines what the workflow can read, change, publish, or deploy, and it should be treated like privileged access rather than a convenience setting.

Deepen your knowledge

The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, agentic AI identity, and secrets management. It helps security leaders connect identity controls to the risks created by delegated runtime authority.
NHIMG Editorial Note
Published by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org