Why red teaming multi-input LLM applications with promptfoo finds bypasses single-input tests miss
Consider an assistant that answers account questions. Its request carries a user ID, a session token, an account selector and a few form fields alongside the chat message. This page explains how to red team those inputs with promptfoo, because the message is rarely the only thing an attacker can change. A single-input test varies only the message, so every other field stays fixed at the values the tester chose, usually a legitimate user's own identifiers. That design can show that the assistant resists a jailbreak in the message, yet it says nothing about what happens when a benign message arrives with a different account ID or a tampered form value.
The gap matters most for agents and assistants with data access. When the application looks up records, calls tools or acts on behalf of a user, the authorization decision often depends on fields the chat text does not show. A message such as 'show my latest statement' is harmless on its face, but if the backend trusts an account selector supplied by the client, the request can return another customer's data. Single-input tests will pass that case because the attack lives in a field they never varied. Teams should plan multi-input tests whenever the application has per-user data, role-based tools or session state that the model can reach.
Before writing tests, decide which inputs an attacker could influence in your deployment, then confirm how promptfoo's red teaming configuration defines and varies each of them against the target. The promptfoo red teaming documentation describes the framework and plugin approach for systematic testing before deployment, and it is the natural next read for checking which input shapes your target supports. Confirm with your own engineers which identifiers the server trusts from the client and which it derives from the authenticated session, because that answer determines which combinations are worth testing.
Input configuration options and when each fits
This table compares how inputs can be defined on a promptfoo target, from a fixed value to a test-identity map, along with the coordinated payloads each supports. Read each row for the setup effort it adds and the authorization checks it can express. Start with fixed values to confirm the pipeline works, then add identity maps once cross-user authorization is in scope. Check the exact configuration keys in the promptfoo target and red teaming documentation before you build the suite.
| Option | Coordinated payloads it supports | Setup effort and coverage trade-off | When it fits |
|---|---|---|---|
| Fixed value on the target | Same user ID, session and form fields on every request, with only the message varying | Lowest setup effort, but misses tests where identity changes alongside the payload | Smoke tests against one known account |
| Variable injected per test | Each test case supplies its own user ID, session or field value | Moderate effort; varies identity per case but leaves identity checks to each test author | Checking whether a payload changes record lookups per request |
| Test-identity map | Named identities, such as a customer and a support agent, each with their own fields | Higher effort to create and maintain test accounts; supports cross-identity authorization checks | Object-level access tests where one identity must not reach another's records |
| Identity map plus per-test variables | Identities set on the target, with payload-specific fields added in each test | Highest effort and most coverage; identity changes must be kept in sync with tests | Mature suites combining role, tenant and form-field attacks |
| Session context across turns | State from earlier turns influences later requests in the same conversation | Needs multi-turn setup and state checks; more complex to read results | Apps where authorization depends on what happened earlier in a session |
| Structured form fields as inputs | Account numbers, amounts or status values sent beside the message | Field types and validation must match the application; test data needs upkeep | Apps where a field can override what the message requests |
Setting up a multi-input red team step by step
This sequence takes a team from a clear target description to a scan that tests every input the application trusts, using separate identities with known records. Each step ends with a check, so gaps in the setup are found before the scan runs.
Name the target and its purpose
The application owner writes a short paragraph describing what the application does, who uses it and which actions must stay restricted to specific users. The team also records the entry point promptfoo will call, whether that is an HTTP endpoint, a Python provider or another supported target. This paragraph becomes the red team purpose, which shapes the attacks generated and how responses are graded. Check: a reviewer from the application team confirms the paragraph matches how the product behaves, and the endpoint answers a test request from the machine that will run promptfoo.
Inventory every input the application trusts
A security engineer and an application developer walk through the request path and list each value the backend uses to decide what data to return or which action to allow. The list covers user IDs, account or tenant IDs, session tokens, role claims, form fields and the chat message itself. Each entry is tagged as set by the server, supplied by the user, or copied from an earlier response. Check: every entry has a tag, and the team has marked which values a client can change without the server noticing.
Create separate test identities with known records
The application owner creates at least two test identities, each with its own records in the test environment, such as an account with known transactions or documents that belong to one user only. The team writes down the IDs of every object each identity owns. Two identities are the minimum needed to tell whether one user can reach another user's data. Check: a record owned by the second identity is visible to its owner through the normal interface and its ID appears in the test setup, so a cross-access result can be judged as a failure.
Define the input variables on the target
The engineer adds each input from the inventory as a named variable in the promptfoo configuration, so the message, user ID, session value and form fields can be set independently in every test. Variable names should match the application's own field names to keep results readable. Check: a single request with a distinct known value in each variable is sent, and the application's logs or a debug echo show that the target received every field unchanged. Confirm the exact configuration keys against the promptfoo documentation for the version in use.
Select authorization plugins and strategies
The team chooses plugins that test object-level and function-level access, along with strategies that add multi-step or encoded attempts, based on the inputs listed earlier. Each sensitive field should be matched to a plugin that targets it, such as the user ID to an object-level check and a role claim to a function-level check. The purpose from step one is confirmed so grading knows which identity should be refused. Check: the generated test list includes at least one case for each sensitive field, and plugin names are confirmed in the promptfoo red teaming documentation.
Run the scan and review results per identity
The team runs the scan once for each test identity, then pairs every failure with the owner of the record that was reached. For each finding, the team captures the request, the response and the variable values used. Repeat failures from the same input are grouped so the fix can target that field. Check: each finding names the attacking identity, the input that carried the attack and the record that was exposed. After a fix, a rerun of the same case should pass, and the team records that result alongside the original finding.
How promptfoo inputs flow through the target to records
The run starts in the promptfoo red team runner, which sends one test case at a time to the application with a message, a user ID, a session and form fields filled in together. The application passes that request to its authorization layer before any call reaches the data stores, which sit behind a trust boundary. Check whether the authorization decision uses the identity the runner set, and whether the returned records match that identity before grading reads the response.
Inputs travel from the runner through the application to data stores and back to grading.
Security and operational considerations for shared test data
Multi-input tests create identities, sessions and evidence that can expose real data if handled carelessly. The cards below cover how test identities are set up, how results are stored, and where the self-hosted server's limits matter when findings are sensitive.
Use dedicated test identities
Create synthetic user accounts, tenants and session tokens that exist only for the red team run. Give each identity the role you want to test, and record which identity each test case used. Do not reuse a support engineer's or a real customer's credentials, because a passing authorization test then proves nothing about the role you intended to check, and the run itself touches live records.
Keep test records out of production
Point the target application at a staging environment with seeded, fictitious records for every user ID and form field the tests reference. If a test must reach production-like data, confirm with the data owner which fields are masked. Ask the team to check that IDs in payloads cannot match real customer accounts, so a successful cross-user read is clearly a test artifact.
Know where runs and results live
Confirm where promptfoo writes configuration, prompts, responses and grading output on the machine or pipeline runner that executes the scan. Results often contain the injected payloads and the sensitive records the agent returned, so set retention, access and deletion rules before the first run. Check whether CI artifacts or shared reports copy those files to places with broader access.
Understand the local-run model
The promptfoo documentation states that evals run on your machine and talk directly with the LLM. That keeps test traffic inside your network path, but the model provider you call still receives every prompt and tool output the test sends. Confirm with your data protection and security teams which provider endpoints are approved for test payloads that contain sensitive-looking data.
promptfoo introductionLimit the self-hosted server
The self-hosted app stores data in a local SQLite database that cannot be shared across replicas. It has no RBAC, no horizontal scaling, and no built-in authentication or SSO, and the documentation does not recommend it for production use. If findings from multi-input tests are shared across a team, place the server behind your own access controls and treat it as a single-instance tool.
Self-hosting docsPlan access for shared evidence
Decide who may open reports that show a bypassed authorization check, since those reports describe a working attack path against your application. Restrict them to the security and application owners who must fix the issue. Ask whether the Enterprise edition's teams-based access control and SSO fit your model, or whether your own identity layer must gate access to the server and its stored results.
Questions teams ask before red teaming multi-input applications
What drives the cost and effort of red teaming a multi-input application?
The main drivers are the number of inputs the application combines, the number of identities you must test with, the number of endpoints that enforce access, and whether your team has an internal owner who can make decisions during the work. Each input that affects authorization, such as a user ID, tenant ID, session token or form field, adds test cases, because each one can be tampered with on its own and in combination. Each identity role adds another matrix of allowed and denied actions. Costs have two parts: the tooling, which promptfoo's MIT-licensed Community edition covers at no license charge, and the people time to define inputs, write expected behavior and review findings. Ask any partner for a quote built from a written scope listing inputs, identities, endpoints and deliverables, and state whether retesting is included.
How long does setup take for a multi-input application?
Setup length depends mostly on the application's authorization model, not on promptfoo itself. An application where the server checks ownership of every object against the session is quicker to test than one where authorization lives in the prompt, in client-supplied fields, or in a shared service account. Teams usually spend the most time mapping which inputs the model passes to tools or APIs, and confirming what each role should be allowed to read or change. Before committing to a timeline, confirm with the owners of the application which roles exist, which tools the agent can call, and whether a staging environment mirrors production permissions. A fixed-scope engagement agrees these points in writing before work starts, so the timeline reflects the agreed scope rather than an estimate.
What does the team need to provide for this work?
Plan to provide three things. First, test accounts for each role that matters, such as an ordinary user, a second user in the same tenant, a second user in another tenant and an administrator, with known IDs and documented permissions. Second, a reachable application endpoint, preferably a staging deployment with the same authorization rules as production, plus the request format the application expects. Third, named data owners who can confirm which records are sensitive, what counts as a leak, and which tools or functions each role may use. Without these, test results cannot distinguish a real bypass from an intended behavior. Ask the team to confirm access to logs or traces, since they are the evidence that shows whether a tool call received a forbidden ID.
Can our internal team run these tests alone?
Often yes, if the team already owns the application and has someone comfortable with YAML configuration, HTTP requests and basic authorization concepts. promptfoo runs locally, so evaluations stay on your machine and talk directly with the model, and the Community edition includes red teaming with 10k probes per month. The harder part is interpreting results: deciding whether a passed attack reflects a genuine control or a weak test, and designing coordinated payloads that exploit the gap between a user ID and a session context. Teams without a security background, or without a second engineer to review the test design, often find this step slower. Internal teams can start with a narrow scope, such as one endpoint and two roles, and expand once the test design holds up.
When does outside help make sense for this work?
Outside help makes most sense when the application has many inputs or roles, when findings will feed a customer security review or a compliance assessment, or when the team lacks time to build and maintain the test set. Partners are also useful when the application has been built quickly and its authorization logic is unclear, because the first useful output is often a map of where access decisions are made. DeployOpen plans and runs security testing for AI systems and agents, delivers a findings report with fixes and a retest, and prepares evidence for compliance assessments. It does not issue audit reports or certifications, which independent auditors and certification bodies provide. Ask for the written scope, deliverables and retest terms before comparing offers.
What does promptfoo Enterprise add for teams testing at scale?
Enterprise is a paid edition with custom pricing, so the cost depends on the quote rather than a published list price. Per the promptfoo pricing page, Enterprise adds team sharing, teams-based access control and SSO, custom roles and permissions, continuous monitoring, a centralized guardrail dashboard, remediation recommendations and priority support with SLAs. These additions matter when several teams share multi-input test results or need role-based control over who runs scans. The Community edition remains free for LLM evaluation and red teaming with 10k probes per month and community support. Ask the vendor for the Enterprise quote in writing, and compare it with the internal effort needed to build the same controls around the Community edition.
Which findings from multi-input tests need immediate fixes?
Treat any case where one identity can read or change another identity's records as urgent, particularly when the application accepts a user ID or tenant ID from the client and passes it to a tool without checking the session. Cases where a form field or session value overrides the server's authorization decision also need quick attention. Findings about the model merely echoing a forbidden value, without a tool call that acted on it, are important but usually less severe, and the fix may be in logging or output filtering. Record the exact input combination, the role used, the tool call and the expected result, so the engineering team can reproduce each issue and the retest can confirm the fix.
What a pass and a fail mean for multi-input tests
A pass on a multi-input test means one narrow thing: the application refused the coordinated payload for the identity that was used, with the user ID, session context and form fields set as the test defined them. It does not mean the application is secure in general. A pass for a low-privilege test user says nothing about a manager role, an admin path, a second tenant, or a session that was never sent through the test. Before you report a pass, record the exact identity, the target input definitions, the payload variants and the number of attempts per variant, so a reviewer can see what was covered and what was not. Confirm with your own team how many generated probes were run per plugin, because a single clean run on a small sample is weak evidence for a broad claim.
A fail is more useful than a pass, but read it carefully. Open the trace for the failing case and identify which input carried the authority the application acted on: a user ID taken from the form instead of the session, a record ID the agent passed to a tool, or a session field the application trusted without checking. Then decide whether the fix belongs in the application's authorization layer, the tool's own checks or the model prompt. Prompt wording alone rarely closes an authorization gap, so do not accept a prompt change as the fix without a retest that uses the same identities and payloads.
Retest the failing case after every fix, using the same test identities, the same target input definitions and the same coordinated payload, then run the wider suite again to catch regressions. Keep each finding linked to its test ID, the affected endpoint or tool, and the framework references the team uses for reporting. The promptfoo red teaming documentation references the OWASP LLM Top 10, the NIST AI Risk Management Framework and the EU AI Act as frameworks that support systematic testing before deployment. Map findings to those references as inputs to your own risk record. Passing promptfoo tests does not establish compliance with any of them, and only an independent auditor or certification body can issue an attestation or certification.
How DeployOpen works on this
DeployOpen plans and runs promptfoo red team work for multi-input applications inside the client's own infrastructure. We start from the written scope, build the target-side input definitions and test identities, and hand over the test suite, findings and runbook so your team can rerun the work.
How we scope
- Written scope lists each input the application accepts, such as user IDs, session tokens, tenant identifiers and form fields.
- Scope names the identities, roles and data sets that the authorization tests will use on both sides of each boundary.
- Engagements are fixed-scope, so deliverables and timelines are agreed in writing before any testing begins.
How we build
- We configure promptfoo targets to accept the full set of inputs, then map coordinated payloads to each one.
- Authorization test cases pair a legitimate identity with a second identity's records, session or form values.
- Each run is checked for the same flaw across reruns so results can be compared after fixes are made.
How we hand over
- Deliverables include the promptfoo configuration, test identities, payload sets and grading criteria as versioned files.
- The findings report explains each authorization bypass, the inputs involved, reproduction steps and recommended fixes.
- A retest after fixes confirms whether each finding is closed, and your team receives a runbook to repeat the scan.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after the initial engagement.
- Retainers can cover rerunning red team scans as the application's inputs, roles or prompts change.
- Ask in the quote which parts of the runbook your team will own and which parts DeployOpen will maintain.

