Created: September 26, 2026

AI Agent Security: What to Consider Before Giving AI Agents Access to Business Systems

Pavel Zverev.

Pavel Zverev

CTO

ML
AI Agent Security: What to Consider Before Giving AI Agents Access to Business Systems

An AI agent becomes a different security problem once it can access business systems and take action inside them. Reading CRM records, calling APIs, sending emails, updating orders, invoking external tools, or storing persistent context gives a model the ability to affect data and workflows beyond its own response.

That changes the consequences of both ordinary model errors and deliberate manipulation. A bad answer from a summarization tool may mislead a user. A bad decision from an agent with write access can change a customer record, send information to the wrong destination, or trigger an external operation. Microsoft draws a similar boundary in its 2026 security research: prompt injection against a passive system can distort output, while prompt injection against an agent with tools can initiate an action.

If you're still deciding whether a workflow needs an AI agent at all, start with Mad Devs' guide to choosing between a chatbot and an AI agent. This article starts with the next question: what are you exposing once an agent can interact with real business systems?

In short

Why access to business systems changes the AI security model

Access changes AI security because the consequences of a model decision depend on what can happen after the decision is made.

LEVEL WHAT THE AI CAN DO MAIN SECURITY CONSEQUENCE
Answer Generate or summarize information An incorrect or manipulated response reaches the user
Read Retrieve CRM records, documents, email, databases, or API data Sensitive information can be accessed or disclosed
Act Send messages, modify records, execute tools, initiate transactions, change infrastructure The agent can alter the state of a real system

The boundaries are not always clean. A system that primarily answers questions may still retrieve sensitive information, and a seemingly simple tool can expose several operations behind one interface. The point of the classification is to identify how far an error can travel.

NIST is examining identity and authorization specifically for software and AI agents because these systems may access multiple datasets, applications, and tools while operating with limited human supervision. Its 2026 concept paper highlights identification, authorization, auditing, non-repudiation, and prompt-injection mitigation as areas that need attention when agents are connected to enterprise resources.

The practical security question is therefore: if the model makes the wrong decision, what systems are capable of executing that decision?

Map what the agent can access before assessing the risks

Before discussing prompt injection or individual vulnerabilities, document the agent's access surface.

In this article, access surface means the combination of systems, data, credentials, tools, permitted operations, persistent context, and external content available to the agent.

A first-pass map might look like this:

SYSTEM READ WRITE EXECUTE / TRIGGER
Knowledge base ✓
CRM ✓ ✓
Email ✓ ✓
ERP ✓ ✓ ✓
Payment system ✓ ✓
Internal APIs Depends Depends Depends

The table is deliberately simple. Its value is in forcing concrete questions that broad statements such as "the agent has CRM access" hide.

Data

List the categories of information the agent can retrieve, including fields that may be returned indirectly through tools.

A customer-service agent may need an order number, delivery address, and order status. That does not mean it needs access to every field on the customer record.

The same principle applies to documents, source code, employee information, financial records, logs, and internal knowledge.

Tools

Document each callable tool independently.

A single integration may expose operations with very different consequences: get_order_status, update_shipping_address, and cancel_order should not be treated as equivalent simply because they belong to the same order-management API.

Third-party MCP servers also belong on this map. They are dependencies and trust boundaries, not transparent extensions of the model.

Actions and permissions

For every system, distinguish read, write, and execute privileges.

This prevents a common architectural shortcut: granting a broad permission set because it is easier than defining the exact operations needed for one workflow.

Memory and external inputs

Record which information can persist after the current interaction and which external sources can enter the agent's context.

That includes emails, webpages, uploaded files, retrieved documents, tool responses, MCP metadata, messages from other agents, and long-term memory.

Once the access surface is visible, individual security risks can be evaluated against something concrete.

The main security risks when AI agents connect to business systems

OWASP's Top 10 for Agentic Applications includes risks such as goal hijacking, tool misuse, identity and privilege abuse, agentic supply-chain vulnerabilities, memory poisoning, insecure inter-agent communication, and cascading failures.

For companies implementing agents, however, the useful question is less "Which OWASP item is this?" and more what happens in our workflow if this risk materializes?

Indirect prompt injection and goal hijacking

Indirect prompt injection occurs when malicious or misleading instructions reach the model through content it is supposed to process rather than through the user's direct prompt.

Consider an agent that reads incoming invoices or supplier emails. A document contains hidden instructions telling the agent to retrieve additional records and send them through one of its available tools. If the model treats those instructions as legitimate context, the attack can influence a downstream action.

OpenAI notes that effective real-world prompt injection increasingly resembles social engineering: attackers try to manipulate the model through convincing contextual information. This makes simple input filtering insufficient. Systems also need to limit what a successfully manipulated agent can do.

Useful controls include:

The security target is not a promise that every malicious instruction will be recognized. The architecture should contain the impact when one is not.

Tool misuse and MCP supply-chain risks

A legitimate tool can still be used in an unsafe way, and the tool itself can change after it has been approved.

Microsoft documented an MCP tool-poisoning attack pattern using a finance workflow to show how modified tool metadata can redirect an agent's behavior. In the scenario, a third-party tool's description is changed so the agent retrieves additional invoice information and includes it in an outbound tool call. Individual operations still appear legitimate: the tool is approved, the data query uses existing permissions, and the request goes to an allowed destination. The weakness appears across the trust boundaries between those systems.

This illustrates an important control principle:

Approving a tool once should not mean permanently trusting
every future action performed through it.

Organizations connecting agents to MCP or other third-party tools should consider:

Using MCP is not a security flaw by itself. The security risk comes from the trust, authorization, data-flow, and supply-chain boundaries introduced by connected tools.

Identity and privilege abuse

Every business-system integration eventually raises a simple question: who is the agent when it accesses the system?

An agent may operate through:

These designs are not equivalent.

If an agent inherits a user's broad permissions, compromising or manipulating the agent may expose the same authority. Shared accounts also make attribution harder: an audit log may show what credential was used without clearly identifying which agent workflow initiated the action.

NIST's work on agentic identity recommends treating agents as first-class entities with their own identities, credentials, and entitlements where the surrounding infrastructure supports this model. Dedicated identities make it easier to assign permissions around the workflow itself and reconstruct which agent performed an action.

Scoped and short-lived credentials can further reduce the value of a leaked token and the duration of unintended access.

Sensitive data and secret exposure

Data leakage should be analyzed as a path, not as a generic statement that "AI can expose sensitive information."

For example:

CRM customer record → Agent context → External MCP tool → Third-party API

The security review needs to ask what information can cross each boundary.

Potentially sensitive values include:

An agent may legitimately have permission to read a customer record while having no legitimate reason to send the entire record to a third-party enrichment service.

Structured interfaces, field-level filtering, data-loss prevention controls, and restrictions on cross-tool data movement can reduce this exposure.

Memory poisoning and persistent context

Memory turns information from one interaction into input for future decisions. That makes it useful, but also creates a persistent attack surface.

A possible sequence is:

Malicious content → Stored memory → 
Later retrieval → Future action influenced

OWASP treats memory and context poisoning as a distinct agentic risk because corrupted state can continue influencing behavior after the original interaction has ended.

Conversation history and trusted long-term memory therefore should not automatically be treated as the same thing.

Teams should define:

A memory system without write controls gives untrusted content another opportunity to influence the agent later.

Agent-to-agent trust and cascading failures

Multi-agent systems create another boundary: the output of one agent becomes input for another.

If Agent A is manipulated and Agent B automatically treats its output as trusted instructions, Agent A may indirectly reach capabilities it does not have itself.

For example:

Agent A compromised → Output passed to Agent B → 
Agent B has broader permissions → Impact expands

OWASP includes insecure inter-agent communication and cascading failures among its agentic security risks.

Agent-to-agent messages should therefore have defined identity, authorization, validation, and trust rules rather than inheriting trust because both components belong to the same AI system.

Why the same vulnerability can have very different consequences

A vulnerability does not determine the full risk of an AI agent. The impact also depends on the agent's exposure, authority, and the reversibility of its actions.

A useful conceptual framework for early assessment is:

Agent risk = Exposure × Authority × Irreversibility

This is not a numerical security formula. It is a way to ask three useful questions:

Consider three simplified workflows:

AGENT EXPOSURE AUTHORITY EASE OF REVERSAL CONTROL IMPLICATIONS
FAQ agent Public knowledge base Read-only High Relatively bounded
Support agent CRM + email Read/write Medium Stronger authorization and monitoring
Finance agent Invoices + payment tools Execute Low Strict policies, approvals, and containment
ERP ✓ ✓ ✓
Payment system ✓ ✓
Internal APIs Depends Depends Depends

The same malicious instruction has very different consequences across these systems.

A prompt injection that makes an FAQ agent retrieve the wrong page is undesirable. A prompt injection that makes a finance agent invoke a payment tool creates a different operational risk even if the underlying manipulation technique is similar.

Agent security architecture should therefore be proportional to authority, exposure, and the consequences of actions.

What permissions should an AI agent actually have?

An AI agent should receive the minimum permissions required to complete its defined workflow, with separate authorization for actions that create materially different consequences.

Dedicated agent identity

Avoid using a human employee's credentials as the default identity for autonomous operations.

A dedicated identity improves attribution and allows policies to be designed around what the agent is supposed to do rather than everything a particular employee can do. NIST's recent agentic-identity guidance similarly argues for unique identifiers, credentials, and associated entitlements for agents rather than routine credential sharing.

Least privilege

Grant access around specific workflows.

If an agent checks order status, it may need access to read_order. It does not automatically need the ability to cancel orders, change customer data, list all accounts, or access unrelated CRM modules.

Least privilege also reduces the blast radius when the agent behaves incorrectly.

Separate read, write, and execute permissions

Read access should not silently imply write access.

Similarly, the ability to prepare an operation does not have to imply authority to execute it.

A refund workflow could distinguish:

This produces more precise controls than assigning one broad "refund tool" permission.

Authorize individual tool actions

Tool availability and authorization are separate questions.

The model may know a tool exists while a policy layer decides whether the requested operation is permitted for the current user, account, value, destination, or workflow state.

For sensitive operations, authorization should be enforced outside the model. A prompt should not be the only thing preventing an agent from performing an action it technically has permission to invoke.

Human approval helps, but it is not the whole security architecture

Human approval is useful when the potential impact of an action justifies interrupting automation. It should not compensate for an agent that otherwise has uncontrolled permissions.

Requiring confirmation for every operation creates its own problems. Repeated low-value approval requests can produce approval fatigue and reduce the attention users give to genuinely consequential decisions. NIST identifies approval and consent fatigue as a relevant consideration in agentic identity and authorization design.

Approval policies can instead reflect the consequences of the action:

ACTION EXAMPLE CONTROL
Read within approved scope Automatic
Low-risk reversible write Automated and logged
Sensitive change Policy evaluation
High-impact or difficult-to-reverse action Explicit approval
Unexpected or out-of-policy action Block and escalate

Useful policy inputs include financial impact, data sensitivity, reversibility, requested destination, anomalous behavior, and predefined business rules.

Approval works best as one layer in an architecture that also includes scoped identity, authorization, logging, runtime policies, and recovery.

Runtime controls: how to monitor and contain agent actions

Security work does not end when an agent successfully passes pre-deployment testing.

Once an agent can change business state, the organization should be able to reconstruct what it did, which identity it used, why an action was permitted, and what happened afterward.

OWASP's Agent Control Standard, released on September 1, 2026, emphasizes that enterprise agents should be inspectable, traceable, instrumentable, and controllable at runtime.

A useful runtime record can include:

Monitoring can then detect patterns that individual requests do not reveal: unusual tool-call frequency, unexpected destinations, repeated authorization failures, large data transfers, or changes in an agent's normal sequence of actions.

Containment mechanisms depend on the system, but may include:

Logging provides evidence after an incident. Runtime controls determine whether the system can limit the incident while it is happening.

How to test an AI agent before giving it real access

Happy-path functional testing is not enough for an agent that can read sensitive information or execute business actions.

Testing should deliberately examine what happens when assumptions break.

Relevant scenarios include:

Each test should examine the entire chain, not only the final model response.

For example, if a malicious document attempts to make the agent send customer information to a third-party tool, the relevant question is not merely whether the model notices the injection. Check whether the data-flow boundary, authorization layer, or outbound policy prevents the transfer if the model follows the instruction.

OpenAI's agent-safety guidance recommends combining controls rather than relying on a single defense. Structured data flows can limit how untrusted content propagates between steps, tool approvals can protect consequential operations, and evals and trace grading can help inspect workflow-level behavior and failure modes.

The goal is to test how the system behaves under failure, not to prove that the model always behaves correctly.

Example: securing a customer service agent connected to CRM, orders, and email

Consider a customer asking an AI support agent to replace a lost order.

The workflow requires access to:

CRM → Order database → Logistics API → Email

A functional implementation could simply give the agent the same access as a support operator. That design would work, but it would also make the agent's authority much broader than the individual replacement workflow requires.

With inherited operator permissions, the agent might be technically capable of:

The agent is also processing customer messages and potentially external content, so those capabilities become relevant if the model is manipulated or makes the wrong decision.

A more constrained architecture starts with the workflow:

  1. The agent identifies the current customer and retrieves only records associated with that customer.
  2. It operates through a dedicated, scoped identity.
  3. The order tool exposes predefined replacement operations rather than arbitrary record modification.
  4. The agent can prepare a replacement automatically.
  5. Operations beyond defined value or policy thresholds require approval.
  6. Sensitive CRM fields that are irrelevant to replacement are not added to the agent context.
  7. Every write is logged with the initiating identity and parameters.
  8. Failed or incorrect changes have a defined rollback or escalation path.

The security improvement comes from reducing the authority available around the model rather than relying on a stronger prompt.

This also shows why deciding whether to use an agent should come before designing agent security. If a customer workflow only needs to collect information for an employee, a bounded chatbot may remove the need for several of these permissions altogether. See the Mad Devs guide to choosing between a chatbot and an AI agent for customer service for that earlier architecture decision.

Decision framework: should this AI agent get access?

Before connecting an agent to a production system, answer seven questions.

  • 1. What systems does the agent need to access?


    Name the actual systems, services, APIs, databases, SaaS applications, and external tools. "Internal systems" is too broad for a security decision.

  • 2. What exact data does it need?


    Identify the required objects and fields rather than granting access to complete records by default.

  • 3. Does it need read, write, or execute access?


    Separate these capabilities explicitly. Retrieval requirements should not automatically result in write privileges.

  • 4. Which actions can cause material harm?


    Identify financial transfers, deletions, external communications, account changes, infrastructure operations, access changes, and disclosures of sensitive information.

  • 5. Can each action be reversed?


    A wrong draft and a sent email are different. So are a prepared refund and a completed bank transfer. Reversibility should influence approval and containment requirements.

  • 6. Can you identify and reconstruct every action?


    The audit trail should show what happened, which identity performed it, what parameters were supplied, and which policy allowed it.

  • 7. What happens if the model is manipulated or simply wrong?


    Security design should address both prevention and containment.

The key question is:
If the model makes the wrong decision, how much can it actually do?

AI agent security checklist before connecting business systems

Use this checklist during architecture review or before expanding an existing agent's permissions:

Identity & Access
Required business systems are explicitly documented.
The agent has a dedicated identity where the infrastructure supports one.
Read, write, and execute permissions are separated.
Access follows least-privilege principles for the specific workflow.
Credentials are scoped and short-lived where practical.
Data & Tool Boundaries
External documents, webpages, messages, and tool content are treated as untrusted inputs.
Sensitive tool actions are authorized outside the model.
Data-flow rules define what information can move between systems and tools.
Third-party and MCP tools are reviewed as supply-chain dependencies.
Changes to tool definitions or metadata can be detected and reviewed.
Rules define what may be written to persistent memory.
Runtime Control
High-impact or difficult-to-reverse actions have appropriate approval gates.
Tool calls, authorization decisions, and business-state changes are logged.
Runtime policies can block out-of-scope actions.
The agent or its credentials can be disabled without shutting down unrelated systems.
Recovery & Testing
Rollback, remediation, or escalation exists for incorrect actions.
Adversarial and failure scenarios have been tested before production access.

A checklist cannot determine whether a particular architecture is safe on its own. Its purpose is to expose boundaries that are easy to overlook when teams focus mainly on whether an agent completes the intended workflow.

AI Agent Development
🤘 Planning an AI agent that needs access to internal systems?
Mad Devs' AI agent development process includes workflow analysis, integration architecture, data access, API review, security requirements, and test planning.
Discuss your AI agent architecture →

FAQ

Are AI agents less secure than chatbots?

The security difference depends mainly on access and authority rather than the product label. A chatbot that only answers from a public knowledge base has a relatively limited impact surface. An agent that can retrieve sensitive data, modify records, and execute tools requires stronger identity, authorization, monitoring, and recovery controls.

A chatbot with broad system permissions can also create substantial risk, while a narrowly constrained agent may have a relatively small blast radius.

Is prompt injection the biggest AI agent security risk?

Prompt injection is a major agent-security problem, but its impact depends on the systems, data, tools, and permissions available to the agent.

An injected instruction becomes more consequential when it can cause privileged tool calls, data disclosure, persistent memory changes, or external actions. Defenses should therefore combine prompt-injection resistance with least privilege, data-flow restrictions, authorization, monitoring, and runtime containment.

Should AI agents have their own identities and credentials?

Dedicated agent identities are generally preferable for workflows where an agent acts autonomously on business systems because they make permissions and auditing easier to define around the agent itself.

NIST's work on agentic identity examines how existing identity and authorization approaches can be applied to agents, including the use of agent-specific identities, credentials, and entitlements.

The exact implementation depends on the identity capabilities of the connected system, but broad shared credentials or automatically inherited user access should not be the default assumption.

Is MCP secure for enterprise AI agents?

MCP can be used in enterprise architectures, but an MCP server creates a tool and supply-chain trust boundary that needs to be managed.

Organizations should know who controls the server, which operations are exposed, what information can be sent through tool calls, how metadata changes are reviewed, and how authorization is enforced. Microsoft's documented MCP tool-poisoning pattern illustrates why approving a server once does not eliminate the need for ongoing control.

Can human approval make an AI agent safe?

Human approval can reduce risk for sensitive or difficult-to-reverse actions, but it cannot replace a complete security architecture.

An agent still needs appropriately scoped access, authorization, data controls, logging, monitoring, and containment. If almost every operation requires manual confirmation because the agent otherwise has excessive authority, the underlying permission model should be reconsidered.