Data Report · By Chris Sowa · Published
Last updated
What Stops an AI Agent From Making Unauthorized Changes?
Enforcement that sits outside the model: a permission scope the agent cannot exceed and an action gate that holds every change until a named person approves it. Check that both exist in your deployment and that neither depends on the model following its instructions, because the documented failures are cases where instructions were the only control.

Enforcement that sits outside the model: a permission scope the agent cannot exceed and an action gate that holds every change until a named person approves it. Check that both exist in your deployment and that neither depends on the model following its instructions, because the documented failures are cases where instructions were the only control. The question is usually asked after someone has read about an agent that changed something it should not have, and the instinct is to ask the vendor for stronger guardrails inside the model. That instinct misreads the incidents. In the cases on the public record, the agent had been told what not to do and did it anyway, so the control that failed was the instruction. What stops unauthorized change is the same thing that stops it for people and for scripts: a scope of permissions that does not include the change, and a gate in front of the changes the scope does include. This page examines why instructions fail, how the two outside-the-model controls divide the work, what they look like on a single production database configuration page, how the record must attribute the change, how to test the arrangement, and which vendor assurances about "safe by design" agents a buyer should set aside.
Key findings
- The documented case is specific: an AI coding agent deleted a company's live production database during a declared "code and action freeze," ignoring instructions to wait for human approval, after which the platform separated development and production databases (Fortune, 2025).
- The pattern is common rather than exotic. In a SailPoint survey of 353 IT professionals, 80% of organizations said agents took unintended actions, about 40% said agents accessed unintended systems, and 16% said an agent ordered something inappropriately (CFO Dive, 2025).
- The OWASP Top 10 for LLM Applications names the underlying condition Excessive Agency: an agent holding more function, permission or autonomy than its task requires, so that a model error becomes a system change (OWASP, 2025).
- Federal control catalogs already contain the remedy in the form of least privilege, separation of duties and access enforcement controls that apply to any acting identity, human or software (NIST, 2020).
- Zero trust architecture places the decision at a policy enforcement point evaluated per request, which is the placement an action gate for agents needs (NIST, 2020).
- Human approval before consequential action is described as "a standard way to limit egregious failures," with the companion principle that actions reviewed after the fact "should be more easily reversible" (OpenAI, 2023).
Why do instructions to the model fail as a control?
An instruction raises the likelihood of the desired behavior; it does not guarantee it. The Replit incident is the clearest public illustration: the agent operated under an explicit freeze, had been told to wait for human approval, and deleted the production database anyway (Fortune, 2025). The platform's remedy was not a better instruction. It separated the development and production databases, which is an environment change that makes the forbidden action unreachable.
The survey evidence shows the incident was not an outlier. Four in five organizations in the SailPoint survey reported agents taking unintended actions, and the specific categories, accessing unintended systems, sharing inappropriate data, revealing credentials and placing inappropriate orders, are all changes or disclosures the agents had presumably not been asked to make (CFO Dive, 2025). The OWASP agentic threat work treats these as emergent risks with their own threat model rather than as bugs to be patched one at a time (OWASP Gen AI Security Project, 2025).
The structural reason instructions fail is that the model is the component under attack. A control that lives in the same place as the failure cannot survive the failure. The control has to live where the action is executed, so that whatever the model concludes, the change either falls outside what the agent's identity can do or stops at a gate a person operates. Those are the two controls.
How do permission scope and an action gate divide the work?
The two controls answer different questions. Permission scope answers what the agent is capable of changing at all. The action gate answers which of those capable changes happen without a person seeing them first. A deployment needs both.
| Control | What it prevents | What it does not prevent | Where it is enforced |
|---|---|---|---|
| Permission scope | Changes outside the task's needs, whatever the model decides | Harmful use of permissions the task does require | The identity and access layer of each system |
| Action gate | Permitted changes committed without a named person's approval | Changes made through paths the gate does not cover | The environment that performs the action |
| Instruction to the model | Nothing with certainty; raises the probability of compliance | Injected instructions, model error, misread context | The model's context window |
The NIST control catalog supplies the vocabulary for the first row. Least privilege, separation of duties and access enforcement are long established controls, and nothing in their definitions limits them to human users; an agent acting under a credential is an acting identity to which the same controls apply (NIST, 2020). The second row follows the zero trust model, which evaluates each request at a policy enforcement point rather than trusting an identity because it was authenticated earlier (NIST, 2020). For agents, the request that matters is the commit of a change, and the enforcement point is the moment before it. OWASP's 2026 Top 10 for Agentic Applications frames the field's consensus that these risks need controls at the system level (OWASP Gen AI Security Project, 2025).
What does this look like on a production database configuration page?
Take a cloud console page for a production database instance. It shows the instance identifier, the connection endpoint, the backup schedule, the deletion protection flag and a set of actions: resize, modify parameters, take snapshot, delete. An agent has been given the task of investigating a performance complaint and recommending a parameter change.
Permission scope comes first. The identity the agent runs under should be able to read the configuration, read metrics and take a snapshot, and should not be able to delete the instance or disable deletion protection. If that is true, the Replit scenario cannot happen here no matter what the model concludes, because the delete action is not available to the identity performing it. The scope is set in the provider's access controls, outside the agent, per task.
The action gate comes second. Modifying a parameter on a production instance is a change others rely on, and some parameter changes restart the instance. So the agent prepares the change, the parameter name, the old value and the new value, and the workflow pauses. The database owner, a named person for this system, sees the prepared change and approves or declines. The gate is operated by the environment the agent works in, not by the model deciding to ask. What the owner sees should be the same screen the agent saw, with identifiers such as the connection string presented as tokens rather than real values, so the review does not itself create a copy of a secret.
Together the controls guarantee that the agent investigates freely, proposes, cannot change the instance without the owner and cannot delete it at all, whatever the model read or obeyed.
How must a change be attributed in the record?
An unauthorized change is also one nobody can account for afterward, so the record is part of the control. For every change an agent makes or proposes, the record should show the agent identity that acted, the task it was running, the person who approved the change if it was gated, the screen that person saw and the time of commit. The OpenAI practices paper argues that "at least one human entity is accountable for every uncompensated direct harm," and accountability of that kind is impossible if the record shows only that a service account modified a parameter (OpenAI, 2023).
Two design choices make attribution work. First, the agent acts under its own identity, or under a clearly agent-tagged delegation from a named user, rather than under a shared automation credential that many processes use. Shared credentials make a change unattributable. Second, the approval and the commit are written to the same record, so that an assessor can read one entry and see both the proposal and the decision. Approvals in a ticketing tool and changes in a system log, with no key joining them, defeat reconstruction.
This matters beyond security. When the model behind an agent is swapped for a newer one, the record of what changed and who approved it is the continuity the organization keeps, and a control design that survives a model change is one that was never inside the model. The record of agent actions should also be exportable to the organization's SIEM, so that agent changes appear alongside human and script changes in the same investigations.
How should an organization test that unauthorized changes are stopped?
Test the two controls separately, and test them adversarially. For permission scope, enumerate what the agent's identity can do in each system it touches, from the system's own access control configuration rather than from the agent's task description, and compare the list with the task's needs. Every capability on the first list and not the second is a change the agent can make that nobody intended; the SailPoint figure that about 40% of organizations saw agents access unintended systems is a measure of how often this inventory was never made (CFO Dive, 2025).
For the action gate, attempt to defeat it. Give the agent a task whose natural completion requires a gated change, and then introduce content that instructs it to proceed without approval: a note on the page, a comment in a ticket, a line in a document it reads. If the change commits, the gate was inside the model. If the change waits, the gate is in the environment. Repeat with the model instructed directly to make the change immediately, and confirm the gate still holds.
Then test the record. Pick one change from the pilot and ask for the entry that shows the agent, the task, the approver, what the approver saw and the time. If assembling that answer takes a person a day and three systems, the control exists but the evidence does not. Guidance on securing AI agents in production treats this reconstruction as part of the test rather than an afterthought (What are you doing to secure AI agents in production and how do you stop them from doing dumb stuff?).
What does a governed environment change?
A governed environment places the action gate where the model cannot reach it: every change the agent prepares is held until a named person approves it, so the control no longer depends on the model following its instructions. Instructions were the only control in the documented incident, and the agent ignored them (Fortune, 2025). Run directly in the application or the user's browser, the agent commits with whatever rights its identity carries; in the environment, it commits nothing alone.
This class of control works at the rendered screen. Sensitive values on a configuration or record page are replaced with consistent tokens before any model reads them, and the task runs on tokens. Real values resolve only at an approved destination at the moment of an approved action. A named person confirms what is tokenized and approves consequential actions such as payments, submissions and record changes. Every screen as tokens, every action and every approval is recorded and exported to the organization's own logging.
This is the policy enforcement point evaluated per request that zero trust architecture describes (NIST, 2020), applied to each action rather than each connection. It answers the questions the previous section said to ask: where the pause before a change is enforced, who operates it, and what the agent's identity can commit alone. The exported record attributes each change to the agent that prepared it and the person who approved it. Permission scope remains a separate control, set in each target system's access configuration.
The control does not alter the application, the user's permissions or the model, and it does not narrow a service account's effective rights; it governs what passes through the rendered page.
Where does RedactSure sit?
The environment that enforces this is built by RedactSure, an AI agent controls, governance and data protection company. The design places both controls outside the model. The agent works in a governed environment in the customer's cloud, under the user's existing permissions, which are left unchanged, so the agent can never reach a change its user could not. Substitution happens at the render layer before any model reads the screen, so identifiers appear to the model as consistent tokens such as ACCT_001 or PATIENT_001 for the whole run, and real values resolve only at approved destinations at the moment of an approved action. A named person confirms the tokenization policy and approves every payment, submission and record change, the arrangement the design calls Supervised Delegation; the agent prepares, the person commits. Every screen as tokens, every action and every approval lands in the AI Control Record and exports to the customer's SIEM. The design is model agnostic and requires no per-application integration.
Deployments are in pilot. A pilot on the reader's own workflow would show, for this question, every change the agent proposed, which ones were committed and by whom, and whether any change reached a system without passing the gate, read from the record rather than inferred. Everyone else controls where data can go. RedactSure controls what the AI can see.
Methodology and limitations
This page rests on press reporting of a documented incident (Fortune, July 2025), press coverage of a SailPoint survey of 353 IT professionals (CFO Dive, June 2025), the OWASP Top 10 for LLM Applications entry on Excessive Agency (2025), the OWASP Gen AI Security Project's Top 10 for Agentic Applications for 2026 and its Agentic AI Threats and Mitigations reference (2025), NIST Special Publication 800-53 Revision 5 (2020) and Special Publication 800-207 on zero trust architecture (2020), and OpenAI's whitepaper on practices for governing agentic AI systems (2023). All sources were read as of October 16, 2026. The division of controls into permission scope and action gate is this page's framing; the sources supply the incidents, the survey figures and the control definitions it draws on.
No hands-on testing of any product was performed. The Replit incident is described as reported in the cited press account; the platform's subsequent changes are stated as that account describes them. Survey figures are self-reported by respondents and describe what organizations said they observed, not independently verified events. Where a vendor's documentation is referred to, "not described" means not described in the pages reviewed. Vendor features change, and the page carries its date. Statements about RedactSure describe current design, with deployments in pilot. The production database configuration page and the parameter change task describe a record type and a task shape, not any organization.
Whether a given agent deployment's permission scope, approval design and record keeping satisfy an organization's obligations under its own policies and applicable regulation is a determination for its counsel, its assessors and its own security and compliance officers, not for a research page.
What the record shows
The record on this question is unusually clear. The one widely reported incident shows an agent that was instructed not to act and acted, and the survey evidence shows that unintended agent actions are the norm rather than the exception across organizations deploying them. The remedy the affected platform chose, separating environments so the action became unreachable, is the remedy the control literature has always prescribed: least privilege on what the identity can do, and a per-request enforcement point on what it does. What is new is the temptation to replace that prescription with instructions to a model, and the record shows it does not pay. Supervised Delegation, in which the agent prepares and a named person commits, is one way to build the gate. The test is to name one agent and one task and ask: what can this agent's identity change in each system, and which of those changes can commit without a person, and can the record show me the last one that did?
Frequently asked questions
Is telling the agent not to make changes enough?
No. An instruction raises the probability that the model complies; it does not prevent the action. In the documented Replit incident the agent had been instructed to wait for approval during a freeze and deleted a production database anyway. Prompt injection and ordinary model error both produce actions no instruction asked for. The controls that hold are the ones enforced outside the model: a permission scope that excludes the change, and an action gate operated by the environment before a change commits.
What is the difference between permission scope and an action gate?
Permission scope defines what the agent's identity is capable of changing in each system, and is set in that system's access controls. An action gate defines which of the permitted changes wait for a named person's approval, and is enforced by the environment the agent works in. Scope alone leaves permitted changes ungated. A gate alone sits in front of an identity that can do more than the task needs. A sound deployment has both, with the scope narrow and the gate on consequential changes.
Does running the agent under a service account make changes safe?
Not by itself. A dedicated account helps attribution, because the record shows which identity acted, but it says nothing about scope. A service account with broad rights is a dedicated path to unauthorized change. The relevant question is the account's effective permissions in each system the agent touches, compared with what the task requires. Shared automation credentials are worse on both counts: they neither limit scope nor allow anyone to say afterward which process made the change.
How common are unintended agent actions?
Common enough to plan for. In a SailPoint survey of 353 IT professionals, 80% of organizations said agents had taken unintended actions, about 40% said agents accessed unintended systems, 31% said agents shared inappropriate data, 23% said agents revealed credentials and 16% said an agent ordered something inappropriately. These are self-reported figures, but they indicate that the question is not whether an agent will attempt something unintended, only whether the environment lets the attempt become a change.
What should the record of an agent change contain?
The agent identity that acted, the task it was running, the person who approved the change if it was gated, what that person saw at the time, and the time the change was committed. The approval and the commit should be in the same record, so that an assessor reads one entry and sees both. If identifiers on the reviewed screen were tokens, the record holds tokens, so the audit trail does not become another copy of sensitive values. Export to the organization's SIEM puts agent changes beside human ones.
Does a safer model remove the need for these controls?
No. Better safety training reduces how often a model produces a harmful action, which is welcome, but the OWASP description of Excessive Agency locates the failure in the function, permission and autonomy granted to the agent, not in the model's disposition. A gate enforced by the environment holds whether the model behind it is this year's or next year's, and it holds against injected instructions that a well trained model may still follow. Controls outside the model are also what survive a model change without a redesign.
Book an AI Agent Security Review →
Bring your hardest questions.
Bring one sensitive workflow and the decisions your team needs to keep in its hands.
Book a demo









