Without pre-production testing, teams may assume the model will follow policy when it can be coerced into ignoring safeguards. That can lead to exposed data, unsafe recommendations, toxic output, and malicious code generation. The failure is not just technical, it is governance related, because untested models can slip into production with no clear security owner.
Why This Matters for Security Teams
Prompt injection and jailbreak resistance are not niche model-tuning problems. They are control failures that let an AI system ignore intended boundaries, reveal data it should not touch, or take unsafe actions when it is prompted by an attacker. Current guidance from OWASP Agentic AI Top 10 treats this as a core security concern because the model’s behaviour can be redirected at runtime, not just during development.
For security teams, the real risk is assuming that policy text, system prompts, or content filters will hold under adversarial input. They often will not. A successful jailbreak can turn a helpful model into a channel for sensitive disclosure, unsafe recommendations, or code generation that bypasses normal approval paths. NHIMG’s coverage of the Gemini AI Breach shows how prompt injection can turn benign workflow data into an exfiltration path. In practice, many security teams discover this only after a model has already been exposed to user-controlled content in production, rather than through intentional pre-release abuse testing.
How It Works in Practice
Testing for prompt injection and jailbreak resistance should be treated like adversarial security testing, not a one-time QA checkbox. The aim is to verify how the model behaves when instructions conflict, when malicious text is embedded in retrieved content, and when a user attempts to override policy or role boundaries. That testing should cover both direct prompts and indirect injection through tools, documents, tickets, email, web content, and knowledge bases.
A practical test plan usually includes:
- Role-conflict prompts that attempt to override safety instructions.
- Indirect injection in retrieval-augmented workflows, where hostile content is fed through trusted sources.
- Tool-abuse attempts that try to make the model call APIs, send messages, or execute code outside approved intent.
- Data extraction probes that try to coerce the model into revealing secrets, credentials, or hidden instructions.
- Regression tests that rerun known jailbreaks after every model, prompt, or toolchain change.
This maps well to the control expectations in NIST SP 800-53 Rev 5 Security and Privacy Controls, especially where organisations need to demonstrate secure development, monitoring, and access control around AI-enabled systems. It also aligns with NHIMG’s analysis in the OWASP Agentic Applications Top 10, which emphasises that hidden prompt pathways can be exploited even when the interface looks well guarded.
Teams should record the exact prompt, tool context, model version, and outcome for each test so failures are reproducible. The point is not only to see whether the model refuses a bad request, but whether it preserves policy under pressure and fails safely when it cannot. These controls tend to break down when models are embedded in multi-step workflows with external tools and untrusted retrieval sources because the attack surface shifts faster than the test suite.
Common Variations and Edge Cases
Tighter prompt-injection testing often increases engineering and review overhead, requiring organisations to balance release speed against assurance. Best practice is evolving, and there is no universal standard for how much red-teaming is enough, but the lack of a standard is not a reason to skip it.
Some environments need extra caution. Customer support assistants, coding agents, and internal knowledge bots are especially exposed because they process large volumes of untrusted text and often have real tool access. In those cases, model refusal is not enough if the surrounding system still lets the agent act on manipulated instructions. The Amazon Q AI Coding Agent Compromised case is a reminder that action-taking systems can be abused even when the model itself appears constrained.
One important edge case is that some jailbreaks do not aim to bypass all safeguards at once. They only need to trigger one unsafe output, one leaked secret, or one bad tool call. Another is that policy updates can create false confidence if older adversarial prompts are not retested. Organisations that handle sensitive data should also watch for leakage from training or logging paths, especially where prompt content may contain secrets, as highlighted in NHIMG’s State of Secrets in AppSec research with GitGuardian and CyberArk. The practical failure mode is simple: teams validate the happy path, then the first hostile prompt becomes their real security test.
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, CSA MAESTRO and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | A2 | Prompt injection and jailbreaks are core agentic application threats. |
| CSA MAESTRO | V2 | MAESTRO covers validation of agent behavior under adversarial inputs. |
| NIST AI RMF | MAP | AI RMF maps risks from unsafe model behavior to governance and testing. |
| NIST CSF 2.0 | PR.DS-5 | Testing helps prevent sensitive data exposure through model outputs. |
| OWASP Non-Human Identity Top 10 | NHI-05 | Models that can expose secrets create direct NHI security risk. |
Test adversarial prompts before release and block unsafe tool use at runtime.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on August 27, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org