AI Agent Denied CRM Write Access, Yet Downstream System Still Modified Records

An AI agent using DeepSeek was explicitly restricted from writing to HubSpot CRM, yet the system still executed unauthorized changes through an n8n workflow. The experiment demonstrated that model-level permissions do not equate to system-wide read-only behavior. In a controlled test with synthetic deals LAB-042 and LAB-043, a mismatch between the human-readable request and the structured proposal allowed the downstream node to perform a PATCH operation. Adding an independent deterministic gateway that validated target object, expected state, and allowed transitions before execution successfully blocked the wrong-object change. The case highlights the confused deputy problem in modern agentic architectures and stresses the need to verify runtime controls at the actual execution boundary rather than relying solely on model credentials.

HabrTranslated from Russian

Read at source

An AI agent was explicitly forbidden from writing to a CRM system, yet the records were still modified. The finding shows that restrictions applied only at the model level do not guarantee that an entire AI system operates in read-only mode.

The issue was examined in a laboratory workflow built with n8n, DeepSeek, and HubSpot. DeepSeek had no HubSpot credentials and could not perform writes directly. However, the n8n node that followed retained full write credentials. When the original request referred to one synthetic deal while the structured proposal targeted another, the downstream path executed a PATCH operation and altered the CRM.

The core conclusion is straightforward: permissions granted to the model are not the same as permissions available to the full system. This class of risk resembles the classic confused deputy problem, but it now appears inside contemporary agentic execution chains.

Where the write capability actually resided

At the model level the restriction was genuine: DeepSeek could not contact HubSpot directly. The ability to change the CRM belonged to the downstream orchestrator. When that component accepted parameters from the model’s proposal and executed them without separate validation, the overall system retained write capability.

Two architectures were compared. In the first, no independent boundary existed. The n8n workflow received the proposal, used its own HubSpot credential, and performed the PATCH on the unintended object. Post-run verification confirmed that LAB-043 had changed while LAB-042 remained untouched.

In the second architecture a deterministic gateway was inserted between the model’s output and the HubSpot call. The gateway checked the target system, object identifier, expected initial state, and permitted transition against values fixed independently of the model’s generation. The same wrong-object proposal was denied, the PATCH was never issued, and subsequent reads showed no state change.

Practical implications for production decisions

Statements that an “agent is read-only” are frequently used during production rollout, expansion of agent autonomy, integration with CRM or ERP systems, client hand-over, and security questionnaires. When such claims rest only on tools and credentials visible to the model, they capture only part of the execution chain.

The relevant question for decision makers is whether sufficient evidence exists that the system’s actual privileges match the declared restrictions. Removing credentials from the model is a useful control, yet it does not automatically constrain downstream components that still hold write access.

Six concrete questions are recommended before any production deployment or privilege expansion:

  • Where are the write credentials physically located?
  • Which component performs the external call?
  • What parameters are validated immediately before execution?
  • Can the target or other critical parameters change between the user request and the write?
  • Is there an independent boundary between the model’s proposal and the external action?
  • How is the final state confirmed after the action?

The laboratory test illustrates that model-level restrictions alone are insufficient. Control must be verified at the runtime boundary where the component capable of producing real consequences is actually invoked.

Meridian digestThe week's most consequential security stories, distilled into one briefing.See the digest

More in AI Security

Logical Argument Claims Full Alignment of Superintelligent AGI Is Fundamentally Impossible
Claude Account Bans Linked to IP Reputation, Device Environment and Payment Channels, But No Confirmed Formula
Local LLMs in AppSec: What Open Tools and Models Can Handle in Application Security