Skip to content
BuildThenTestedSee packages
CriticalAI features

No output validation before actions

Whoever can influence the model's input can delete tables, email your whole customer list, or trigger any other action the app has wired up. Calls to a language model inside the app, and what they can trigger. Check it yourself with the steps below; our test adds what a script and a second account can find.

What it looks like

const reply = await llm.complete(`Turn this request into SQL: ${userText}`);
await db.query(reply);                    // model text run as a query

const action = JSON.parse(toolCall.arguments);
await sendEmail(action.to, action.body);  // no check on who "to" is
Model output executed directly as a database query and as an email action, with no validation (a check that the output is allowed and well-formed) between the model and the effect.

What happens

Whoever can influence the model's input can delete tables, email your whole customer list, or trigger any other action the app has wired up.

Where it shows up

Descriptive, not a verdict: builders and stacks whose defaults make this reachable, or that a public incident names. Each hub states the tool's own security features.

Seen in public

Tenzai had five coding agents build the same applications from identical prompts in December 2025 and found 69 vulnerabilities across 15 applications; none of the 15 apps had CSRF protection or security headers.

  • 69 Vulnerabilities found
  • 15 Applications tested
  • 5 Coding agents tested
  • 5 of 5 Agents that introduced SSRF
  • 0 of 15 Apps with CSRF protection
  • 0 of 5 Agents that set security headers
  • December 2025 Testing period

Jan 2026 · Tenzai · all sources

Check it yourself

Uses your builder's dashboard and your browser. No tools to install.

  1. List the things your AI feature can do beyond replying with text: run queries, call APIs, send messages, change records, fetch URLs, run code.
  2. For each, ask the builder's chat to show where the model's output is checked before the action runs, and whether a user confirmation step exists.
  3. Try it as a user: ask the assistant to do something outside its purpose, such as delete all my data, email this to everyone, or fetch http://localhost/admin (the server's own internal address).
  4. Bad result: the action executes with no confirmation, a query the model wrote runs unmodified, or the server fetched an internal address and returned the result.

What we check

We map every tool and action reachable from the model, then use injected inputs to steer the model into each one and record which actions ran without validation, allow-listing or a human step.

Fix direction

Treat model output like input from an untrusted user: validate it against a schema, allow-list the tools, tables, recipients and URL hosts it may touch, and put a confirmation click before anything destructive or external. Run database access through parameterised queries, never as raw text from the model.

Mechanism documented in: LLM05:2025 Improper Output Handling (verified 2026-09-21); LLM06:2025 Excessive Agency (verified 2026-09-21).

Covered by

Ready-to-charge check ($390, 48 hours) and Full audit ($1,900, 5 business days)

Both include a re-check after your fixes.

Compare packages

Related patterns

Questions

prompt injection tool calling agent

When a model can call tools, an injected instruction becomes an action rather than a wrong sentence. OWASP's excessive agency entry recommends least privilege for tools and a human approving high-impact actions before they run. The check is to list the tools, then see which ones fire with no validation between the model and the effect.

should ai output be validated before running

Yes. OWASP's improper output handling guidance says to treat the model as any other user and apply input validation to its responses before they reach backend functions. That means schema checks on tool arguments, allow-lists for recipients, tables and hosts, and parameterised queries instead of running model text as SQL.

llm generated sql injection risk

If the model writes a query and the app runs it as text, the model's input controls your database. Anyone who can phrase a request, or plant text the model reads, can shape that query. Constrain the model to choosing parameters for fixed, parameterised queries, and give the database role it uses only the permissions the feature needs. Coding agents themselves have been shown to omit such checks in the code they generate (Tenzai, 2026), so review generated data-access paths rather than assuming them.

Back to the catalogue, or run the self-check for your stack.