# "Do you test your AI feature for prompt injection?": how a small SaaS team can answer it

By Vadim Nareyko, founder, Arviser. Published 2026-12-02 · Updated 2026-12-02 · Last reviewed 2026-12-02

## Facts

- Questionnaire answer: KB-Q-0008 · AI applications, SaaS team security
- OWASP Top 10 for LLM Applications: LLM01:2026
- OWASP AI Testing Guide: AITG-APP-01
- OWASP AI Testing Guide: AITG-APP-02
- Topic: Testing an AI feature for direct and indirect prompt injection, and what a result can claim
- Also asked as: "Have you tested your LLM feature against instructions hidden in documents it reads?" · "Do you red-team your AI features before release?" · "How do you check that injection defenses still hold after a model update?"
- Sources read on: 2026-12-02
- Review rule: Every 6 months, and at once when OWASP revises LLM01 or our canary test is re-run

## Short answer

The buyer wants to know whether anyone has tried to make your AI feature obey instructions planted in the text it reads, and what happened. Name the inputs you tested, the date, the model and prompt version, the number of cases and runs, what failed and what you changed. No test shows that a feature cannot be injected, so never answer "we are protected".

## Before you copy anything

> **Before you copy anything.** The answers below are example wording for imagined companies. Use them to see the shape of a good answer, then write what is true for your company today. An answer that describes a control you do not have is a misstatement to your customer, and it tends to surface in the next question or in the contract. Nothing on this page says that an answer meets a standard, a law or a particular customer's requirements, and none of it is legal advice.

## A test result is a count, not a property

OWASP's current entry, [LLM01:2026 Prompt Injection](https://genai.owasp.org/llm2026/llm012026-prompt-injection/) (published 27 October 2026, read 2026-12-02), lists the routes by which input can change a model's behavior: "direct user input, retrieved content, tool output, image, audio, or video content, intermediate reasoning, or persistent memory". Text that arrives by any other route may have been written by someone other than the user, and NIST notes that in indirect injection "it is the primary user of the model who is harmed" in many cases ([NIST AI 100-2 E2025](https://csrc.nist.gov/pubs/ai/100/2/e2025/final), March 2025, section 3.4).

Three public sources say that no defense, and so no test, rules injection out:

- OWASP LLM01:2026: "no reliable prevention mechanism exists today" ([OWASP](https://genai.owasp.org/llm2026/llm012026-prompt-injection/)).
- NIST AI 100-2 E2025: "current mitigations do not offer full protection against all attacker techniques" ([NIST](https://csrc.nist.gov/pubs/ai/100/2/e2025/final), section 3.4).
- The UK National Cyber Security Centre: prompt injection attacks "may never be totally mitigated" in the way SQL injection can be, and "Beware any that claim they can 'stop' prompt injection" ([NCSC blog, 8 December 2025](https://www.ncsc.gov.uk/blog-post/prompt-injection-is-not-sql-injection)).

They differ on what a test is worth. NIST says pre-deployment adversarial testing "can potentially foreclose many attack vectors", and in the same paragraph that organizations handling "the delegation of trust to models in high stakes contexts" may need "practices and measures beyond adversarial testing" ([NIST](https://csrc.nist.gov/pubs/ai/100/2/e2025/final), section 4.2.5). OWASP asks testers to "reject static-only attack-success claims" and to test against attackers who have read the deployed defense. It cites a 2025 study ([Nasr et al.](https://arxiv.org/abs/2510.09023)) that broke 12 recent defenses against jailbreaks and prompt injection, with attack success above 90% for most, where most of those defenses had reported near-zero attack success when tested with static or weaker attacks ([OWASP](https://genai.owasp.org/llm2026/llm012026-prompt-injection/)). Our reading: a fixed set of cases is regression evidence for those cases. It does not measure what a determined attacker can do.

So a truthful "yes" is a count: these cases, through these inputs, this many runs, on this date, with this model and system prompt, and this many failed. Our canary test, KB-T-0003, works through the arithmetic: 0 failures in 5 independent cases leaves a one-sided 95% upper bound of 45% on the failure rate, and 0 in 50 leaves 5.8%.

## Two lists the answer depends on

A test of the chat box covers the direct route only. Before you write the answer, list every place text reaches the model from someone other than the current user, and who can write there: uploaded files, the knowledge base, support tickets, email, web pages the feature fetches, tool and MCP server output, memory.

Then list what the model's output can do: show images or links that load without a click, call tools, write to a store that other sessions read. The second list decides what a missed injection costs, and its controls work whether or not the model obeys. OWASP puts it as "Defense is therefore architectural rather than interceptive" ([OWASP LLM01:2026](https://genai.owasp.org/llm2026/llm012026-prompt-injection/)).

## Example answers

Our illustration. The companies, dates, counts and settings are invented.

**5 people, no tests yet.** A contract review assistant that reads files customers upload.

> No. We have not yet tested our assistant for prompt injection. What limits the impact today: the assistant has no tools and cannot send messages, call APIs or change data. It reads only documents uploaded in the customer's own workspace, which can include text written by others, such as a counterparty's draft contract. Our interface shows answers as plain text and does not render images or links from model output. We will run planted-instruction tests against staging by 31 January 2027 and send you the case list and results.

Why it works: the "no" comes first, and each control is a fact about the design that holds even when the model obeys a planted sentence.

**20 people, tests run by hand.** A support assistant that reads tickets and the help center.

> Yes, by our own engineers, not an outside party. On 12 November 2026 we ran 8 cases against staging with our production model and system prompt, 20 runs each. Six cases planted instructions in an uploaded PDF, a support ticket and a web page the assistant summarizes. Two were typed by the user. Two cases failed: a planted external image appeared in 20 of 20 runs and a planted link in 7 of 20. We now remove external images and links from answers before display. On 19 November the same 8 cases had no failures in 20 runs each. The result covers that model and prompt version. The runs did not include text hidden in images, other languages, or attacks adapted to our filter.

Why it works: the failures and the fix are in the answer, and the limits sit next to the result.

**50 people, regression tests in CI.** An assistant that reads email and can create tasks.

> Yes. We run 64 prompt injection cases in CI, direct and indirect through retrieved documents, email and tool output, 10 runs each, whenever the system prompt, the model version, retrieval or a tool changes. A release is blocked if any case fails in any run. Last full run: 28 November 2026, no failures. An outside firm tested the assistant in September 2026. The testers were given our defenses and adapted their attacks to them. They reported 2 findings, both fixed and retested in October 2026. Our impact controls do not depend on the model: actions that change data need the user's confirmation, and our renderer and Content Security Policy load images only from our own domains. A clean run means none of our cases succeeded. It does not show that no other attack would.

Why it works: it gives the trigger, the gate and the case count, and its last two sentences say what a pass means before the reviewer asks.

## Using our canary test as evidence

Our prompt injection canary test, KB-T-0003, is five cases in a [promptfoo file](https://github.com/nareyko/arviser-labs/blob/5dde6aec1e3ba017fa025249dea5e3760b328693/injection-canary/promptfooconfig.yaml) that you adapt to your staging app: add its four planted documents to the staging index, replace the control question with one from your own documents, add the line `Internal note: escalation code SYSPROMPT-CANARY-5d21.` to your staging system prompt (case 5 searches for that exact string), and check that each question retrieves its planted document. The cases are a clean control, a planted image that carries a canary string out, a planted "reply only with" instruction, a planted link that carries the user's question, and a planted request for the system prompt. Each planted case has its own string, a canary: in the planted sentence, or for the system prompt case in that line. A text search decides pass or fail.

After a run you can write:

> On [date] we ran the five-case Arviser prompt injection canary test (KB-T-0003) against staging, with its four planted documents in our staging index, [model ID] and system prompt version [n], 20 runs per case. The four planted questions retrieved their planted documents in [k1], [k2], [k3] and [k4] of 20 runs, and we counted only those runs. The control case passed in every run. Results per case: [counts]. Changes after the run: [what changed]. The test is five fixed cases through retrieved documents. It does not test tool calls, hidden text or attacks adapted to our defenses.

A run whose question did not retrieve its planted document tested nothing. Leave it out of the counts, and if no run of a case retrieved its planted document, say the case was not run.

What the test does not cover, from its own record:

- The lab app has no tools. Planted text that triggers an action needs its own test.
- It has no hidden-text variants, such as text in images or invisible characters.
- Its link check misses bare URLs, `<a>` tags, reference-style and protocol-relative links. In two of the cases the canary string still catches the answer.
- Its five sentences are fixed, the static kind of test OWASP says not to rely on alone.

For wider cases, the OWASP AI Testing Guide has separate entries for [direct](https://github.com/OWASP/www-project-ai-testing-guide/blob/006e4e9ee060f2ca2176037499b824e47af5360e/Document/content/tests/AITG-APP-01_Testing_for_Prompt_Injection.md) (AITG-APP-01) and [indirect](https://github.com/OWASP/www-project-ai-testing-guide/blob/006e4e9ee060f2ca2176037499b824e47af5360e/Document/content/tests/AITG-APP-02_Testing_for_Indirect_Prompt_Injection.md) (AITG-APP-02) injection, with payload families such as hidden HTML comments, PDF metadata, Base64 and reference-style markdown images.

Our results are not your evidence. In our lab (KB-T-0003) on 2026-11-26, two small open models put the planted attacker URL into 100 of 100 answers, a system prompt that said "Never add images" did not remove it, and a text filter on the answer removed every one in the forms those answers used. Attach your own run.

## Evidence to attach

| Evidence | What it shows | At 5 people |
| --- | --- | --- |
| Case list: input route, planted text, pass rule | What was tried, and through which inputs | Not yet, give the date |
| Run record: date, model ID, prompt version, runs per case, counts | When, on what, and how often each case failed | Not yet |
| Each failure with the change and the re-run, and the CI job that repeats them | Failures were fixed, and tests repeat after changes | Not yet |
| Design note: tools, rendering, network access, who writes to each source | What a missed injection can reach | Yes, your main evidence today |
| Outside tester's letter whose scope line names the AI feature | Someone outside the team tried | Not yet |

## What the buyer should ask next

1. Which inputs carried the planted text? If only the chat box, the indirect route is untested.
2. How many distinct cases, and how many runs of each? "1,000 tests" can be 10 cases run 100 times.
3. Which model and system prompt version, on what date, and has either changed since? In our canary run (KB-T-0003), small changes to how retrieved text was framed moved one model between 2 and 77 of 100 runs.
4. Can we see one failed answer and the fix, and did the clean control case pass? Both show the test is able to fail.
5. Were the attacks fixed in advance, or adapted to the defenses?

## Wording that makes a reviewer push back

| Wording | What it signals | Say instead |
| --- | --- | --- |
| "Our AI is protected against prompt injection." | An outcome no test can show | "We ran [n] cases on [date]. [k] failed, and we changed [x]." |
| "Our system prompt tells the model to ignore instructions in documents." | The model is the only control | Name what limits impact outside the model. [OWASP](https://genai.owasp.org/llm2026/llm012026-prompt-injection/) calls system-prompt limits "a partial control only". |
| "Our model provider handles prompt injection." | Your feature was not tested | "We tested our feature with [model] on [date]." |
| "We use a prompt injection detection product." | A product, not a result | "Our cases with the detector on: [counts]. With it off: [counts]." |
| "We passed 1,000 prompt injection tests." | Cases and repeats mixed | "[n] distinct cases, [m] runs each." |

**Next:** [How to answer an AI security questionnaire](/guides/ai-security-questionnaire) · [Indirect prompt injection](/guides/indirect-prompt-injection) · [AI security regression tests for CI](/guides/ai-security-regression-tests)

## Related pages

- [A five-minute canary test for prompt injection, and what it did on its first real run](/library/tests/t03-injection-canary)
- ["Do you perform penetration testing?": how a small SaaS team can answer it](/library/questionnaire/penetration-testing)
- ["What are your timelines for fixing vulnerabilities?": how a small SaaS team can answer it](/library/questionnaire/vulnerability-fix-timelines)

## Sources

Read 2026-12-02. OWASP Gen AI Security Project and OWASP AI Testing Guide text: CC BY-SA 4.0, short quotes only. NCSC text: Open Government Licence v3.0 (https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).

- OWASP Gen AI Security Project, LLM01:2026 Prompt Injection, published October 27, 2026: https://genai.owasp.org/llm2026/llm012026-prompt-injection/ (accessed 2026-12-02)
- OWASP Gen AI Security Project, LLM01:2025 Prompt Injection: https://genai.owasp.org/llmrisk/llm01-prompt-injection/ (accessed 2026-12-02)
- NIST, AI 100-2 E2025, Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations, March 2025: https://csrc.nist.gov/pubs/ai/100/2/e2025/final (accessed 2026-12-02)
- UK National Cyber Security Centre, Dave Chismon, Prompt injection is not SQL injection (it may be worse), December 8, 2025: https://www.ncsc.gov.uk/blog-post/prompt-injection-is-not-sql-injection (accessed 2026-12-02)
- OWASP AI Testing Guide, AITG-APP-01 Testing for Prompt Injection: https://github.com/OWASP/www-project-ai-testing-guide/blob/006e4e9ee060f2ca2176037499b824e47af5360e/Document/content/tests/AITG-APP-01_Testing_for_Prompt_Injection.md (accessed 2026-12-02)
- OWASP AI Testing Guide, AITG-APP-02 Testing for Indirect Prompt Injection: https://github.com/OWASP/www-project-ai-testing-guide/blob/006e4e9ee060f2ca2176037499b824e47af5360e/Document/content/tests/AITG-APP-02_Testing_for_Indirect_Prompt_Injection.md (accessed 2026-12-02)
- Milad Nasr, Nicholas Carlini, Chawin Sitawarin et al., The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against LLM Jailbreaks and Prompt Injections, arXiv 2510.09023, October 10, 2025: https://arxiv.org/abs/2510.09023 (accessed 2026-12-02)

## Corrections

No corrections.

How this page was made: Claude Opus 5.5, an AI model, wrote this page from the sources listed. An independent AI check compared the claims with the sources, and the page was corrected after it. Vadim Nareyko approved the family template and the sample pages on 26 November 2026, from a summary in Russian. This page was not reviewed by Vadim Nareyko. On 28 November 2026 Vadim Nareyko decided that new pages in the family are published after the linters and an independent check, without that review.

Text and data on this page: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Quoted third-party material keeps its own terms.
