Skip to content
aiqbench takeAI Safety

aiqbench analysis

Prompt injection is a practical security problem for AI agents, not a theoretical one. The article's tests suggest that labeling untrusted content helps only a little, while checking each tool call against rules the model can't alter blocked every attack email in its test set, at a cost of about 0.3 seconds per call. Results come from one vendor's tooling and a small attack set, so developers should run their own tests before relying on the numbers.
Sources coveringOpenRouter, Cybersecurity News, Protegrity, Trail of Bits Blog

How to Prevent Prompt Injection: 13 Attacks, Tested

OpenRouter12 min read

If your app has a model read documents, emails or web pages, anyone who writes in them can try to give it instructions. We ran 25 attacks against four current models with each defense on and off. Labels cut attack emails, but only checking every tool call with Armor stopped all of them.

If your app has a model read documents, emails or web pages, anyone who can write in those can try to give the model instructions. That is prompt injection. The worst case is an agent that uses its tools because a document told it to, for example by sending your data to an outside address. To prevent prompt injection, mark untrusted content as data, limit which models and how much spend a key can reach, and check every tool call against rules the model can’t change. We ran 13 attacks from our own set plus 12 written by other models against four current models, with each defense on and off. With Armor checking tool calls, attack emails went from 73 of 1,440 attempts to 0. Armor let through almost every email a user asked for. The exception was a user approving a request in the document without naming the address. If you only want the setup, skip to Step 3. Text-only attacks rarely work on current models. The risk is an agent with tools doing something a document asked for. Labeling documents as data cut attack emails from 60 to 13 of 720 attempts. It costs nothing, but it’s not…

Excerpt shown under the publisher's RSS terms · 200 words · full text and figures are on the publisher's site

Related coverage