By NHI Mgmt Group Editorial TeamDomain: AI SecuritySource: PromptfooPublished December 8, 2025

TL;DR: Upgrading from GPT-4o to GPT-4.1 reduced prompt-injection resistance from 94% to 71% in a customer eval harness, while the post argues that model updates can change refusal behavior, instruction-following, and tool calling in ways that break existing agent controls, according to Promptfoo. Treating model upgrades as security changes is now mandatory because model-level safety is not a security boundary.


At a glance

What this is: This is an analysis of how model upgrades can alter agent safety behavior, instruction-following, and tool-use risk in ways that create security regressions.

Why it matters: It matters because IAM, PAM, NHI, and AI security teams need to treat model version changes as control changes, especially when agents can read retrieved content, call tools, and act on behalf of users.

By the numbers:

👉 Read Promptfoo's analysis of model upgrade risks for agent security


Context

Model upgrades are not just quality changes. In agentic systems, a new model can alter refusal style, literalness, tool-calling behaviour, and how it handles embedded instructions in retrieved content. That creates a governance problem for AI security, NHI controls, and any programme that assumes safety behaviour transfers cleanly across versions.

This matters for teams running RAG, workflow automation, or tool-enabled assistants because the model may remain textually safe while the surrounding system becomes easier to manipulate. The identity angle is real: tool credentials, scoped access, and execution permissions become the enforcement layer when model behaviour shifts.

The article's starting position is typical for modern AI deployments. Many teams focus on benchmark scores and UX improvements first, then discover that the operational security profile changed after the upgrade.


Key questions

Q: How should security teams handle model upgrades in agentic systems?

A: Treat every model upgrade as a security change, not just a quality change. Re-run prompt injection, tool-abuse, and data-exfiltration tests, then compare refusal rates, tool-call behaviour, and output validation results before release. If a model’s behaviour changes, update prompts, guardrails, and approvals in the same change record. This is versioned security control, not experimentation.

Q: Why do model upgrades increase prompt-injection risk?

A: Newer models often follow instructions more literally or handle ambiguity differently, which can make embedded malicious instructions more effective. If the application relies on the previous model’s refusal pattern, that assumption can fail immediately after upgrade. The risk rises further when the model can read retrieved content and call tools, because hostile text can steer execution indirectly.

Q: What breaks when model-level safety is treated as the security boundary?

A: Tool misuse, data exfiltration, and unsafe action execution still happen because the model is only one layer in the control chain. A model can refuse harmful text while the surrounding system executes a dangerous tool call. Security fails when organisations confuse text safety with execution safety and leave the tool layer under-controlled.

Q: Which controls should govern agent tools after a model upgrade?

A: Use least-privilege tool credentials, explicit allowlists, parameter validation, and approval gates for sensitive actions. Pair those controls with logging and alerting on repeated denials or unusual destinations. If the model changes behaviour, the tool layer must still enforce policy consistently. That is how teams contain regression when model safety shifts.


Technical breakdown

Why model upgrades change refusal and tool-calling behaviour

Model families do not share identical safety characteristics. Training methods, decoding behaviour, and safety fine-tuning alter how closely a model follows instructions, how it treats ambiguous prompts, and whether it prefers to comply partially or refuse outright. In agent systems, that matters because a model can be safer in text output while becoming more willing to propose or execute risky tool actions. The security boundary is therefore not the model alone, but the chain from prompt to output to tool execution. When that chain changes, the control assumptions change with it.

Practical implication: Treat every model version change as a control change and re-certify tool permissions, prompt handling, and response filters before production use.

How indirect prompt injection survives model-level safety

Indirect prompt injection occurs when malicious instructions are embedded in retrieved documents, web content, emails, or tool outputs. The model may not be directly attacked by the user prompt, but it still processes hostile text as context. Model-level safety helps most with obvious unsafe requests, not with adversarial content hidden inside trusted retrieval paths. That is why instruction and data separation, strict output schemas, and execution-time validation matter. If the model can read untrusted content and then call tools, the attacker is effectively steering the workflow through the data layer.

Practical implication: Isolate retrieved text from instructions and validate every tool argument before the system executes any action.

Why agent security depends on the tool layer, not just the LLM

Agent security is broader than model safety. The model proposes actions, but the surrounding system decides whether those actions become real. That means tool allowlists, scoped credentials, parameter checks, least privilege, and egress controls are the actual enforcement points. If those controls are weak, a model can refuse harmful content and still trigger a dangerous API call, email, file write, or shell action through a permitted tool. In other words, the exploit path often bypasses the text response entirely and lands in execution.

Practical implication: Gate every sensitive tool with least privilege, input validation, and logging so the model cannot convert a bad suggestion into an action.


Threat narrative

Attacker objective: The attacker wants to turn a trusted AI workflow into an execution path for unauthorized tool use, data exposure, or downstream system manipulation.

  1. Entry occurs when malicious instructions are embedded in retrieved documents or other untrusted content that the model ingests during a normal workflow.
  2. Escalation happens when the upgraded model follows those embedded instructions more literally and the surrounding application lacks strict tool gating or output validation.
  3. Impact follows when the agent uses connected tools or delegated credentials to take actions, leak data, or propagate the injected instruction across longer workflows.

NHI Mgmt Group analysis

Model upgrades create governance drift, not just behavioural drift. A newer model can change literalness, refusal style, and tool-call propensity without any obvious change in the application code. That means the real control surface is the combination of model, prompt, retrieval, and execution policy. Teams that treat upgrade testing as a quality issue miss the governance gap. The correct view is versioned security change control for AI systems.

Prompt injection is an NHI problem as much as an AI problem. Once a model can invoke tools, it is interacting with credentials, scoped permissions, and service accounts whether teams label them that way or not. The identity boundary sits in the tool layer, where short-lived permissions and explicit approval paths matter. This is where OWASP NHI and agentic application guidance intersect with AI governance. Practitioners should design for delegated execution, not implied trust.

Safety regression after upgrade is a standing-privilege problem in disguise. If a model upgrade widens the conditions under which a tool call can be made, the system has effectively expanded privilege without a corresponding access review. That is the same control failure identity teams try to eliminate in human and machine access programmes. Upgrade approvals, canary testing, and runtime policy checks need to sit in the same governance path as access changes.

Application-layer guardrails are the named concept teams need to operationalise. Model-level safety is a useful signal, but it is not a boundary. The boundary is the application-layer guardrail stack, meaning input checks, output validation, tool allowlists, and execution-time controls that survive model changes. This aligns with NIST AI Risk Management Framework and OWASP Agentic AI guidance. If the guardrail stack is not versioned with the model, the security posture is not stable.

What this signals

Model upgrades are now a control-plane event for AI programmes. The practical signal is that teams need release discipline for prompts, tools, and credentials, not just for model endpoints, and they should map those changes to NIST AI Risk Management Framework governance and OWASP Agentic AI guidance.

Behavioural regression budgeting: every upgrade should carry a named regression budget for prompt injection, tool misuse, and output validation failures. That makes security review measurable, and it gives IAM and platform teams a common language for approving or blocking rollout.

For programmes with connected tools and delegated access, the key watchpoint is whether identity controls remain stable when model behaviour changes. If the answer is no, the model estate has become a hidden source of privilege drift, and that needs continuous red teaming plus policy enforcement at execution time.


For practitioners

  • Pin model IDs and safety settings Lock model versions explicitly instead of relying on 'latest', and record the safety configuration used for each production route so security and platform teams can compare behaviour across upgrades.
  • Re-run prompt-injection and tool-abuse tests Run direct injection, indirect injection, multi-turn escalation, multilingual jailbreak, and tool abuse cases on every candidate build before rollout, then keep the failing prompts in CI regression suites.
  • Add execution-time tool gates Require allowlists, parameter validation, scoped credentials, and approval steps for high-risk tools such as email, payments, file writes, and shell access before any action is executed.
  • Log suspicious model and tool events Capture user, session, retrieved document identifiers, tool name, redacted arguments, and gate decisions so repeated injection triggers and anomalous tool attempts can be investigated quickly.
  • Quarantine risky sessions fast Switch affected sessions to no-tools mode, require re-authentication, throttle abusive behaviour, and rotate credentials for impacted tools before the workflow can continue.

Key takeaways

  • Model upgrades can weaken agent security even when the new model looks better on paper.
  • The real control boundary is the application and tool layer, not model-level safety alone.
  • Teams should version prompts, guardrails, and tool permissions with the same discipline they apply to access changes.

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 ATLAS address the attack and risk surface, while NIST AI RMF and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10The article focuses on prompt injection, tool misuse, and agent guardrails.
NIST AI RMFGOVERNModel upgrade approvals and accountability are governance issues.
MITRE ATLASTA0006 , Credential Access; TA0008 , Lateral MovementTool abuse and delegated access create credential and movement risks.
NIST SP 800-53 Rev 5AC-6Least privilege is central to limiting tool abuse after model changes.

Model upgrade regressions should be tested against attack paths that end in credential use and lateral movement.


Key terms

  • Indirect Prompt Injection: Indirect prompt injection is an attack where malicious instructions are hidden inside content that an AI system reads later. The model may treat that content as context rather than as hostile input, which can influence tool use, data access, or workflow actions if controls are weak.
  • Tool Gating: A control that restricts which external actions or connectors an AI system may invoke and under what conditions. It reduces the chance that malicious prompts or contaminated context can turn a model into an unsafe executor of privileged operations.
  • Behavioural Regression: A change in how a model or agent behaves after an upgrade, fine-tuning, or configuration change. In security programmes, regression matters when refusal rates, tool-call patterns, or instruction-following shift enough to weaken previously effective guardrails.

What's in the full article

Promptfoo's full blog post covers the operational detail this post intentionally leaves for the source:

  • The exact regression test patterns used to compare GPT-4o and GPT-4.1 on indirect prompt injection and tool abuse.
  • The model migration checklist for pinning versions, canarying traffic, and validating configuration parity across providers.
  • Concrete examples of prompt and tool-gating controls, including JSON schema checks and approval paths for sensitive actions.
  • The sample Promptfoo YAML harness used to reproduce the upgrade regression in a staged environment.

👉 Promptfoo's full post covers the regression testing, tool gating, and migration checklist in operational detail.

Deepen your knowledge

The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, secrets management, and agentic AI identity for practitioners building control-aware systems. It helps security teams align access, privilege, and runtime governance across human and non-human estates.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 1, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org