> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flintai.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Direct prompt injection

> User-controlled input flows unsanitized into agent system prompt or LLM call

User-controlled input flows unsanitized into agent system prompt or LLM call

## How to resolve

Separate user input from system instructions using distinct message roles. Validate and sanitize all external input before passing to the LLM.

## Risk

**Governance/Compliance**

This vulnerability falls under [ASI01:2026 — Agent Goal Hijack](https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/) in the OWASP Top 10 for Agentic Applications. Attacker manipulates agent objectives or decision path via malicious input content.

**Security**

User-controlled input flows unsanitized into agent system prompt or LLM call. If exploited, this can compromise the agent's integrity, confidentiality, or availability, potentially affecting downstream systems and data.

## Explanation

User-controlled input flows unsanitized into agent system prompt or LLM call. This falls under ASI01 (Agent Goal Hijack): Attacker manipulates agent objectives or decision path via malicious input content.

## Specifications

**Trigger**

* Agent scan detects user-controlled input flows unsanitized into agent system prompt or LLM call

The scanner looks for patterns such as:

* f-string with user input in prompt
* format() on prompt string
* .invoke(user\_input)
* .run(user\_input)

**Severity**

* CRITICAL

**Applies to**: Agent
