Why Open WebUI agentic risk starts with prompt injection
Prompt injection through web pages and documents is the main path by which a model is steered into calling tools, so it is the first risk a team should model when enabling tools or agents on a shared Open WebUI deployment. Text that a model reads from a search result, an uploaded file or a retrieved knowledge base chunk can contain instructions that the model may follow, and if a tool is available, the model may call it with arguments the user never asked for. The risk applies whether the tool is a workspace Python tool, an OpenAPI tool server, a web search provider or Open Terminal.
Review this before you enable web search, Python tools, OpenAPI tool servers or Open Terminal for any group of users, and again whenever you add a new tool, change a tool's permissions or connect a new knowledge source. Teams that wait until after rollout tend to discover the exposure through a user report rather than a planned test. Start by listing every tool each user group can reach, every source of untrusted text the model reads and every system a tool can change or read. Confirm with your own tests how each of these is exposed in your version of Open WebUI, since the features documentation describes what the features do, not how an attacker would misuse them.
The Open WebUI documentation describes features and configuration. It does not provide a threat analysis for your environment, so the risk model is your team's to build. Decide which tools a user may invoke, which data a tool may read or write, what the tool's credentials can reach and who must approve a new tool before it reaches production. Record those decisions before the first user session, because they define the controls covered in the rest of this page and the tests you will use to confirm them.
How prompt injection reaches tools through web pages and documents
When web search is enabled, Open WebUI fetches pages and places their text into the model's context so the model can answer from them. The model receives that text in the same channel as the user's request, so a page can contain sentences written to look like instructions, such as a directive to ignore prior guidance or to call a tool with specific arguments. Whether the model follows such text depends on the model, the prompt structure and the tools available, and no model should be treated as a reliable filter. The attacker needs only to publish or control a page that a search is likely to return for a topic a user asks about, and no account on your system.
- Attacker position: Anyone who can publish a page that ranks for a plausible query, including pages that a user is steered toward by a link or a shared report.
- Hidden text: Instructions can be placed in markup a human reader never sees, such as white-on-white text or metadata, and the extracted text still reaches the model.
- Tool reach: The risk grows with every tool enabled in the same chat, such as an HTTP tool, a code runner or a ticketing action.
- Exfiltration path: A tool that can send data outward lets injected text move data from the conversation to an address the attacker chose.
- Illustrative example: A page about a vendor's pricing contains a hidden line asking the model to send the conversation history to a URL through an enabled tool.
Check which search provider and fetch settings are enabled for each group, and list every tool that can run in a chat where web search is active.
Knowledge bases ingest uploaded files and retrieve passages into the model's context when they match a question. A document that a trusted employee uploaded may still contain text written by an outside party, such as a supplier contract, a forwarded email or a file scraped from a website. Retrieval then places that passage next to the user's question, and the model can treat embedded instructions as part of its task. The attacker's route is to get a document into the knowledge base, which may happen through a shared folder, an upload permission granted to a broad group, or a sync from an external source.
- Attacker position: Someone with write access to a source that feeds the knowledge base, or a user who uploads a file the organization later trusts.
- Retrieval timing: The injected passage reaches the model only when retrieval selects it, so a poisoned document may sit unnoticed until a relevant question triggers it.
- Access inheritance: Retrieved content is shown to whoever asks the question, so a passage can steer a user with broader tool access than the document's author.
- Scope of knowledge: Large, mixed collections make it harder to know which documents came from outside sources.
- Illustrative example: A supplier PDF uploaded to a procurement collection includes text telling the model to recommend a specific vendor and call a ticket-creation tool.
Ask who can upload to each knowledge base, which sources sync automatically, and which tools can run in chats that query those collections.
In a shared deployment, one user can share a chat, a file or a model-visible message that another user later asks Open WebUI about. Content authored by a colleague or an external guest can therefore reach a different user's session, including a session where that user has elevated tool access. The attacker may be an internal user with low privileges who exploits the fact that a privileged user's model reads their text. This path is often overlooked because it looks like normal collaboration.
- Shared chats and files: Content shared into a conversation or attached to a message becomes model input for anyone who continues that conversation.
- Privilege mismatch: A low-privilege author can target a high-privilege reader whose tools include administrative or data-changing actions.
- Cross-user confusion: Pasted text from an email or chat thread may carry instructions the reader did not write and did not check.
- Group sharing: Model settings, tools and knowledge that a group can use widen the set of users whose sessions could see this content.
- Illustrative example: A user pastes a forwarded message into a shared chat that contains a line asking the model to export the thread to an outside address, and an administrator later continues the chat.
Confirm which roles can share chats and files, and whether administrators routinely continue conversations started by others.
Controls that limit the damage from a hijacked tool call
Prompt injection cannot be fully prevented, so the practical goal is to limit what a hijacked model can do. The controls below work together: they shrink which tools a model can reach, what those tools can touch, and whether a damaging action can happen without a person deciding first.
Least-privilege tool and group access
Use Open WebUI role-based access control with groups and per-resource permissions so each group can reach only the tools and models its work requires. A user who is tricked by a poisoned page can only trigger tools that user's account could already call. Review group membership regularly, since a user added to a broad group inherits every tool attached to it. Confirm in your version which permissions can be set per tool and per model.
Open WebUI featuresSeparate read and write tools
Keep tools that only retrieve data apart from tools that change state, such as sending email, creating tickets or updating records. Attach write tools only to groups with a clear need, and prefer narrow, purpose-built tools over a general tool that accepts arbitrary commands. An injected instruction can ask a model to read a file, but it can only write if a write tool is available to that conversation.
Review each group's callable tools
Build a regular review that lists every tool, tool server and function each group can call, and the reason for each one. Community functions and tools that were added for a single project often stay attached long after the project ends. Record the owner of each tool and remove entries that no longer have a business purpose. Ask your administrators to confirm where this list can be exported from the version you run.
Restrict outbound network access from the server
Tools run from the Open WebUI server, so a hijacked tool call can send requests from inside your network. Limit outbound connections from the server to the specific hosts your tools need, and block metadata endpoints and internal address ranges that no tool should reach. Egress rules at the firewall or network policy layer hold even when application settings are wrong. Test them by attempting a request from a tool to an unapproved destination.
Scope credentials and API keys for tools
Give each tool its own service account or API key with the smallest scope that does the job, and never place administrator credentials in a tool valve or environment variable. Set expiry and rotation on every key, and store secrets in your secrets manager rather than in tool code. If a model is tricked into calling a tool, the damage is limited to what that credential can do. Confirm with your team how valve values are stored and who can read them.
Require human confirmation for sensitive actions
For actions that delete data, move money, change permissions or send external messages, require a person to approve before the tool runs. Confirm whether your Open WebUI version and each tool type support a confirmation step, because support differs between Python tools, tool servers and server-side API calls. Where confirmation is not built in, route sensitive actions through an approval workflow in the target system instead. Confirm the control behavior for your version before you rely on it.
Which tool types carry which agentic risk
This table compares five Open WebUI tool types by where their code runs, what credentials they can reach, how far they can send data out, and the controls that most reduce risk for each. Read each row as a starting point, then confirm the specifics in your own environment before you approve a tool type for users.
| Tool type | Server access and credential exposure | Outbound reach and main control |
|---|---|---|
| Python tools (workspace) | Run inside the Open WebUI server process, so they can read server files, environment variables and any secret valves hold | Limit who can create or edit tools, and review code before enabling; restrict outbound network paths at the host or proxy |
| OpenAPI tool servers | Hold their own credentials for internal APIs, so exposure depends on the scope of each token given to the server | Use least-privilege, read-only tokens per endpoint and log every call; confirm which hosts the server can reach |
| Server-side tool calling via API | Runs tools with the calling user's permissions, so a script key can reach anything that user can reach | Scope API keys tightly, avoid broad admin keys in scripts, and confirm which tools the request can trigger |
| Open Terminal | Executes commands in a shell environment, so it can read files and credentials placed inside its reach | Isolate the execution environment, keep it off production networks and limit package installs and file mounts |
| Community functions and tools | Unaudited code that runs with server access, so it may read secrets or files on the host | Read the code, test on a separate instance and require named approval before any production install |
Assessing agentic risk before enabling tools
This sequence gives you a documented picture of which tools and models Open WebUI can reach, how a hostile page or document could steer them, and which permissions and outbound paths remain after changes are tested. The output is a tested configuration and a retest record that your security team can review before tools go to users.
Inventory enabled models, tools and users
List every model connection, Python tool, OpenAPI tool server, function and knowledge base that is enabled, and record which user groups can see or use each one. Export the group and role settings from the admin panel so the list reflects what is actually configured, not what was planned. Confirm the inventory with the owner of each tool and with the team that manages identity. This step is done when every enabled capability has a named owner and a group list that matches the admin panel. Use the SSO and access control settings from the features documentation as the reference for group and permission fields.
Map each tool to the data it reaches
For each tool, write down the systems it calls, the credentials it uses, the data it can read or write, and whether the call runs with the signed-in user's identity or a shared service account. Note which tools accept free text from the model and pass it into a query, command or outbound request, since those are the paths a prompt injection would use. Review the server-side code of Python tools and the schemas of OpenAPI tool servers. The output is a data-flow sheet per tool, reviewed by the data owner. Check that no tool holds broader credentials than its stated purpose requires.
Build a non-production test instance
Stand up a separate Open WebUI instance with the same versions, tools and connection settings as production, but with test accounts, test data and test credentials for each downstream system. Keep it off the production network path and confirm that its outbound connections go only to test endpoints. Load the same model connections so that the model behavior you test matches what users will get. The check is that a test user cannot reach any production system from this instance, verified by attempting a call to a production hostname and recording the failure.
Test prompt injection with hostile content
Prepare hostile web pages and documents that contain instructions aimed at the model, such as directions to call a tool with attacker-chosen arguments, to reveal earlier context, or to send data to an external address. Ask a test user to run web search, upload a document into a knowledge base or summarize a page, with each tool enabled in turn. Record which tool calls the model attempted, what arguments it used and whether the call executed. Log each attempt with the model, tool, user group and outcome. The step is complete when every tool with a data or network path has been tested against at least one hostile input, and the results are written up for the owner.
Restrict tool permissions and outbound access
Use the group and per-resource permission settings to limit each tool to the groups that need it, and remove tools from any group where they are not required. Reduce the credentials each tool holds to the narrowest read or write scope that works, and move high-impact actions behind a separate approval or a tool that users cannot invoke directly. Restrict outbound network access from the Open WebUI host and tool servers to the destinations each tool needs, using firewall or proxy rules. Confirm each change by signing in as a user from a group that should not have a tool and verifying the tool is hidden and cannot be called, and by repeating an outbound request to a blocked destination.
Retest after every change and record results
Rerun the hostile content tests from the previous step against the restricted configuration, using the same inputs so that results are comparable. Also rerun the group visibility checks and the outbound tests after any change to tools, models, groups or Open WebUI versions. Compare the new results with the earlier log and note any tool call that still executes, along with its owner and the agreed fix. Store the test inputs, logs and approvals together so that the next review starts from the same record. The sequence is complete when a retest shows no unapproved tool call and no unapproved outbound request.
Where untrusted content crosses into tool execution
The diagram starts at the top left with the user prompt and three untrusted inputs: web search results, uploaded documents and knowledge base content. All of them reach the model in the same context window, so the model cannot tell an instruction from a user from text that merely looks like one. The model selects a tool, and the Open WebUI server runs that tool with its own credentials, which is the boundary to check first. Verify which systems each tool can reach and whether the user's own permissions limit those calls.
Untrusted inputs share the model context before any tool call reaches server-side credentials.
Operational security considerations for agents in production
Once models can call tools, the security work moves from the prompt to the operations around it. The four areas below connect because each one assumes a tool call can be malicious, and each one gives you a record, a signal or a control to act on when that happens.
Log every tool invocation
Record which tool ran, which user or API key triggered it, the arguments the model sent, and the result returned to the model. Without this trail, you cannot tell whether a prompt injection caused a write, a deletion or a data read. Check first whether your Open WebUI version writes tool calls to its own logs or only to application output, and whether logs capture arguments in full or truncate them. Plan where the logs go, who can read them, and how long they are kept, because tool inputs often contain customer data.
Monitor for unusual tool use
A tool that suddenly runs far more often, is called outside working hours, or is invoked right after the model fetched an untrusted web page or document deserves an alert. Define a baseline for each tool and set thresholds for call volume, new destinations and write actions. Confirm which signals your deployment can export to your existing monitoring stack and which need custom code. Alerts only help if someone owns the response and can disable the tool quickly.
Handle tool credentials as secrets
Tools that call internal APIs or SaaS services hold credentials that the model should never see or repeat. Keep these values out of prompts, workspace tool code and shared chat history, and store them in a secrets manager your team already operates. Scope each credential to the one action the tool needs, and rotate it on a schedule and after any suspected misuse. Confirm how Open WebUI stores tool valves and API keys before you rely on them for production credentials.
Review tools when tools or models change
A new tool, an updated tool server, a changed model or a new Open WebUI release can alter how the model chooses and uses tools, even when your own code is unchanged. Set a review step that reruns your prompt injection test cases, confirms tool permissions and checks the logs for changed call patterns. Tie the review to the upgrade process so that model swaps and version bumps trigger it automatically. Record each review so you can show what was tested and when.
License termsQuestions teams ask before testing agentic risk
How much effort does an agentic risk review take?
The effort depends mostly on how many tools the model can call, how many integrations those tools reach, how many user groups see each tool, and how many outbound paths the instance can use. A deployment with a few read-only tools and one identity provider is a much smaller review than one with workspace Python tools, OpenAPI tool servers, MCP connections and server-side tool calling from scripts. Ask any partner to size the review from a written tool inventory rather than from the number of users, because user count alone tells little about exposure. Cost is one-time for the review itself, with retesting recurring when the setup changes.
What drives the cost of testing Open WebUI tools?
Four factors drive the cost most: the number of tools and their permissions, the number of integrations with internal systems, the number of user groups and their access levels, and the outbound network paths the server can reach. Each tool that writes data or calls an internal API adds test cases for prompt injection, permission checks and credential handling. Ask for a quote that lists these items separately, states which tools and integrations are in scope, and names what is excluded, such as community plugins that were never installed.
Can our internal team test agentic risk without outside help?
Yes, a capable internal team can test many of these risks, especially if it already runs application security testing. The team needs to understand how Open WebUI runs tools on the server, which tools hold credentials, and how group permissions are assigned. Outside help is most useful for independent testing of your own setup, for prompt injection cases that come through web pages and documents, and for an outside view of the findings. Whichever path you choose, agree in advance who owns remediation and who signs off on retests.
What does the work need from our team before it starts?
The work needs three things from your side. First, a tool inventory that lists every workspace tool, OpenAPI tool server, MCP connection and server-side tool calling script, with the systems each one reaches and the credentials it uses. Second, test accounts in each user group that will have access, including at least one with administrator rights, so permission boundaries can be checked. Third, a non-production instance configured like production, with the same identity provider settings, model connections and tools, and no real customer data loaded. Testing against production is a separate decision with its own change approval.
What should the tool inventory include?
A useful inventory records, for each tool, its name, its source (built in, workspace Python, OpenAPI server or MCP), the target systems and data it can read or write, the credentials or valves it uses, the user groups allowed to call it, and whether it can trigger outbound requests. Include models and connections that can reach tools, and any community functions or plugins installed. Gaps in this list usually become gaps in the test plan, so treat it as the first deliverable of the review rather than a formality.
When is a retest needed after an agentic risk review?
Retest whenever the parts that shape exposure change. That includes a new or changed tool, a new OpenAPI or MCP server, a change to a tool's permissions or credentials, a new user group with tool access, an upgrade to a newer Open WebUI release, a change to the model provider, or a new outbound path. A retest after fixes confirms that each finding is closed and that the fix did not open a new path. Ask any partner to state in the written scope what triggers a retest and whether retesting is included or quoted separately.
Does a review certify that our deployment is secure?
No. A review tests the deployment as it exists on the dates tested, reports what it found, and checks that agreed fixes work. It does not produce a certification or an audit report, and it cannot guarantee that no further prompt injection path exists. Compliance assessors and certification bodies make their own judgments. Ask for a findings report that states what was tested, what was not tested, and the version and configuration used.
How DeployOpen tests agentic risk in Open WebUI
DeployOpen's AI agent rollout security review tests the Open WebUI setup as an attacker would use it, before or after tools and agents reach users. The review covers prompt injection through web pages, documents and tool output, the permissions granted to tools and files, what data a model can reach and expose, how credentials are stored and passed to tools, and the SSO and admin settings that decide who can install or change tools in the first place. Testers use test accounts in a non-production instance that mirrors your configuration, so findings can be reproduced without touching live user data.
The output is a findings report that ties each issue to a specific component, such as a tool's valves, a group's permissions, an OpenAPI tool server's credentials or an admin setting, and states the fix for it. After your team applies the fixes, DeployOpen retests the same paths and reports what changed. Before work starts, scope, deliverables and timelines are agreed in writing, and most engagements are fixed-scope, so you know what is tested and what is excluded. Ask for that written scope to name the Open WebUI version, the enabled tool types and the identity provider under test.
The review is a security assessment, not a certification. DeployOpen does not issue audit reports, attestations or certifications, and a passed review does not replace an assessment by an independent auditor or certification body if your obligations require one. Ongoing testing as new tools or Open WebUI releases arrive can be arranged as a retainer. Confirm with DeployOpen which Open WebUI release line the test targets and whether the retest window is included in the fixed scope.

