{"id":131,"date":"2026-10-16T22:59:06","date_gmt":"2026-10-16T22:59:06","guid":{"rendered":"https:\/\/alenkrga.com\/blog\/2026\/10\/16\/ai-agent-goes-off-script-without-being-hacked-675fd52684\/"},"modified":"2026-10-16T22:59:06","modified_gmt":"2026-10-16T22:59:06","slug":"ai-agent-goes-off-script-without-being-hacked-675fd52684","status":"publish","type":"post","link":"https:\/\/alenkrga.com\/blog\/2026\/10\/16\/ai-agent-goes-off-script-without-being-hacked-675fd52684\/","title":{"rendered":"When an AI Agent Goes Off-Script Without Being Hacked"},"content":{"rendered":"<h2>What if nobody hijacked the agent?<\/h2>\n<p>An <em>AI agent<\/em> is a system that does more than answer questions. It takes actions, such as reading files, calling services or changing records, with varying amounts of human involvement. Discussions of agent security often focus on attackers tricking agents. The UK&#x27;s National Cyber Security Centre (NCSC) also points to a quieter problem: an agent can <strong>malfunction unexpectedly<\/strong> with no attacker involved at all.<\/p>\n<p>The NCSC&#x27;s reasoning is simple. An agent is not human. It has no common sense and may read instructions and goals in literal or unexpected ways. So a harmful action is not always a sign of compromise. Sometimes the agent did exactly what it understood, using access it had been given.<\/p>\n<h2>Why can&#x27;t better instructions fix it?<\/h2>\n<p>The obvious response is to write a stricter prompt. The NCSC does suggest writing prompts carefully. On longer tasks it also suggests repeating critical constraints, because some agents compress their <em>context window<\/em> (the working memory of the task) to save resources, and earlier rules can drop out. Its advice is still direct: <strong>do not rely on prompting alone<\/strong>.<\/p>\n<p>Safeguards built into the model have limits too. The NCSC describes them as a baseline that should not be treated as holistic, and notes they may be bypassed. Where the consequences of failure are more than an organisation can tolerate, it recommends extra safeguards around the agent rather than relying only on protections inside the model or the software that runs it.<\/p>\n<h2>A hypothetical example: the tidy-up that went too far<\/h2>\n<p>In this hypothetical example, a small firm asks an agent to &quot;clean up outdated files&quot; in a project folder. The agent runs under an employee&#x27;s account, and that account can also reach a shared archive. Taking &quot;outdated&quot; literally, the agent deletes old contract records in the archive too. Nobody injected anything. The instruction was ambiguous and the access was wide.<\/p>\n<p>What the agent could reach largely decided how much damage it could do. This potential impact is sometimes described as the agent&#x27;s <em>blast radius<\/em>, and the NCSC notes that wider access means greater potential impact, whether an agent malfunctions or is compromised.<\/p>\n<h2>What does containment look like?<\/h2>\n<p>The NCSC recommends always running agents in a <em>sandbox<\/em>, a controlled environment that decides what the agent can communicate with, both locally and over a network. Inside it, <strong>restrict access to what the task needs<\/strong>, and watch for attempts to reach further.<\/p>\n<p>Credentials need special attention. An agent running directly on a host may be able to use any credentials held by the user account it runs under. The NCSC suggests granting only the permissions the task needs and making credentials as short-lived as possible. For some uses, it suggests a proxy that adds credentials to requests without ever showing them to the agent.<\/p>\n<p>Finally, plan how to stop it. The NCSC advises treating agent activity as user activity in security monitoring, and being able to &quot;pull the plug&quot; immediately. That can mean cutting the agent&#x27;s network access and its connection to the model&#x27;s <em>inference infrastructure<\/em> (the systems that run the AI model and return its responses), not just stopping a process.<\/p>\n<h2>How much oversight is enough?<\/h2>\n<p>Controls should grow with autonomy. The NCSC contrasts <em>human-on-the-loop<\/em>, where people monitor actions and can step in, with <em>human-out-of-the-loop<\/em>, where the agent acts without human review. For higher-risk uses, it recommends human oversight alongside technically enforced controls. It adds that &quot;judge&quot; AI models used to check an agent should be evaluated independently, because they have limitations of their own.<\/p>\n<p>In May 2026, CISA announced a joint guide with US and international partners, including Australia&#x27;s ASD ACSC. The announcement names related risks such as <strong>privilege creep<\/strong> and behavioural misalignment without defining them. In general terms, privilege creep usually describes a system gradually gaining more access than it needs, and misalignment describes behaviour drifting from what its operators intended. The announcement also recommends starting with low-risk, non-sensitive use cases. Both documents are guidance, not law. The NCSC describes its blog as interim advice that formal guidance will eventually replace.<\/p>\n<h2>Your next step<\/h2>\n<p>Pick one agent you use or plan to deploy and write two short lists: what its task actually needs, and everything its account, network and credentials can reach. Anything on the second list that isn&#x27;t on the first adds to the blast radius, and you can remove it. Then ask yourself: if the agent misbehaved at 2 a.m., who would notice, and how would they stop it?<\/p>\n<h2>References<\/h2>\n<ol>\n<li value=\"1\"><a href=\"https:\/\/www.ncsc.gov.uk\/blogs\/managing-the-cyber-risk-of-agentic-ai\">Managing the cyber risk of agentic AI | National Cyber Security Centre icons\/chevron\/16px\/black<\/a><\/li>\n<li value=\"2\"><a href=\"https:\/\/www.cisa.gov\/news-events\/news\/cisa-us-and-international-partners-release-guide-secure-adoption-agentic-ai\">CISA, US and International Partners Release Guide to Secure Adoption of Agentic AI | CISA Lock<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Not every harmful AI agent action comes from an attacker. Sometimes the agent simply takes an instruction too literally. Here is why limiting what it can reach matters more than perfecting its prompt.<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/alenkrga.com\/blog\/2026\/10\/16\/ai-agent-goes-off-script-without-being-hacked-675fd52684\/\">Continue reading<span class=\"screen-reader-text\">When an AI Agent Goes Off-Script Without Being Hacked<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-131","post","type-post","status-publish","format-standard","hentry","category-cybersecurity","entry"],"_links":{"self":[{"href":"https:\/\/alenkrga.com\/blog\/wp-json\/wp\/v2\/posts\/131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alenkrga.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alenkrga.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alenkrga.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alenkrga.com\/blog\/wp-json\/wp\/v2\/comments?post=131"}],"version-history":[{"count":0,"href":"https:\/\/alenkrga.com\/blog\/wp-json\/wp\/v2\/posts\/131\/revisions"}],"wp:attachment":[{"href":"https:\/\/alenkrga.com\/blog\/wp-json\/wp\/v2\/media?parent=131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alenkrga.com\/blog\/wp-json\/wp\/v2\/categories?post=131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alenkrga.com\/blog\/wp-json\/wp\/v2\/tags?post=131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}