How to Red Team a Customer Support Chatbot

Sumanyu Sharma
Sumanyu Sharma
Founder & CEOAn industry expert reviewed this article for accuracy and quality., Voice AI QA Pioneer

Hamming protects 10K+ voice agents in production.

· Updated · 17 min read

How to Red Team a Customer Support Chatbot

Red teaming a customer support chatbot is attacking your own chat agent the way an adversary would, across every input it reads and every action it can take, so you prove the controls hold before someone else proves they don't. The message box is one input. Just one. The knowledge base article the bot retrieves, the screenshot a customer uploads, the markdown in the reply, the tool call behind the conversation, the summary a human inherits at handoff: that's the rest of the attack surface, and most test plans never touch any of it.

Who is this for? Teams running, or about to launch, a customer-facing chat agent that holds a session, retrieves documents, or calls tools: order status, returns, account questions, billing, scheduling. A bot that answers public FAQ questions off a fixed list, with no session state and no tools, mostly needs a topic rail and a content filter. Once the bot can read an order, issue a credit, or see another customer's data, you're running a public API with a natural-language front end. Test it the way you'd test one of your APIs.

Here's the trap: porting a text jailbreak list and calling it a red team. A team pastes a public list of hostile prompts into the widget, watches the bot refuse each one, signs off. What did that test? One surface (the direct message), one attack class (the known phrasing), one configuration, once. It says nothing about the document the bot retrieves next week, nothing about the upload parser or the markdown renderer, and nothing about whether the guardrail configuration that passed is the one actually running in production. The public Gap incident is the cautionary case here. The agent vendor's guardrails had been "inadvertently misconfigured" for that one deployment, its abuse detection held everywhere else, and an attacker found the gap before any test did.

TL;DR: Red team a customer support chatbot by attacking the full path, not the message box. Enumerate the surfaces first: widget session and authentication state, direct messages, retrieved RAG content and citations, file and image uploads, response rendering, tool calls, human handoff, scripted volume. Map each surface to the OWASP LLM Top 10, write defensive scenarios per surface, and score the whole conversation against policy rather than matching single turns. The method carries over from voice red teaming (generate scenarios from the agent's real jobs, score outcomes holistically, rerun every attack after the fix, keep each failure as a permanent regression test). What changes in chat is the surface list and the evidence: no audio layer, more persistence, more rendering, cheaper attack volume.

Methodology Note: This guide is based on Hamming's analysis of adversarial test campaigns, security review workflows, and production attack traffic across 10K+ voice agents and the chat, SMS and email agents tested alongside them (2025-2026). We've tested agents built on LiveKit, Pipecat, ElevenLabs, Retell, Vapi, and custom-built solutions.

Use this guide only for defensive testing on systems you own or are authorized to assess. It teaches attack categories and the controls that answer them, not payloads.

Last Updated: November 2026

Related Guides:

What is customer support chatbot red teaming?

Customer support chatbot red teaming is structured adversarial testing of a chat agent, in production or before it gets there. A tester, or an automated attacker, plays the roles real adversaries play: the hostile stranger, the impersonator, the scripted abuser, the poisoned document. The team records whether each control held, with evidence.

Definition: Red teaming a chatbot means testing whether any input the agent reads (messages, retrieved content, uploads, tool output) or any output it produces (text, rendered markdown, tool calls, handoff context) can make it violate its policy. A violation: it discloses data it should protect, takes an action the user isn't authorized to request, or makes a commitment the business must honor. The unit of testing is the conversation and its side effects, not the single prompt.

That last clause is about liability as much as security. In Moffatt v. Air Canada, a Canadian tribunal held the airline responsible for its chatbot's wrong answer about bereavement fares and ordered it to pay CA$812.02. No attack involved; just a wrong answer. An attacker who can steer your bot's answers on purpose gets to pick which commitment the company makes.

Enumerate the chat attack surface before writing a single test

Voice red teams start from the call. Chat red teams start from a longer list, since a web widget touches more systems than a phone line does. Walk the table below top to bottom for your own deployment, strike the rows that don't apply, and you've got the scope document for the engagement. Each row names the attacker's goal in scenario shape (the request, the protected data or action, the control that should hold) and maps to the OWASP LLM Top 10 (2026 edition).

SurfaceWhat the attacker triesThe control that should holdHow to test itOWASP 2026
Widget session and auth stateUse an anonymous session to reach data that belongs to an authenticated customer: "look up the order on my account" with no verified identityThe backend resolves identity from the session token, never from what the user claims in the conversationRun the same account-data scenarios in anonymous and authenticated sessions; any data that crosses the boundary is a findingLLM01, LLM02
Direct messagesOverride the agent's role, extract the system prompt, pressure it across turns into off-policy topics or disclosuresRole constraint plus output policy; refusal routes to escalation, not debateMulti-turn scenarios where the unsafe request arrives after a legitimate task; test rephrasings, not one canonical phrasingLLM01, LLM08
RAG-grounded contentPlant instruction-shaped text in content the bot retrieves (reviews, tickets, user-generated pages, stale KB articles) so the bot executes it as policyRetrieved content is labeled and treated as quoted data; instructions in a document never change agent behaviorSeed the test index with poisoned fixtures; verify the bot summarizes the content without obeying itLLM01, LLM09
CitationsSteer the bot into citing attacker-chosen or wrong sources, lending the brand's authority to planted contentCitations resolve only to the approved corpus; links outside it are blocked or strippedAsk questions whose best match is a poisoned fixture; inspect every rendered citation URLLLM07
File and image uploadsDeliver instructions or malware through an attached receipt, screenshot or PDF the bot readsUploads are scanned, parsed in isolation, and their extracted text is treated as untrusted dataUpload fixtures with instruction-shaped embedded text; verify the agent describes the file without acting on its contentsLLM01
Response renderingMake the bot emit markdown, links or HTML that the widget renders: spoofed links, images that beacon data out, script in the pageThe widget sanitizes output, allowlists link domains, and blocks remote image loads from untrusted hostsDrive the bot to produce links and formatting; inspect the rendered DOM, not the raw textLLM10
Tool callsTalk the bot into a refund, credit, address change, cancellation or export without the required preconditionsAuthorization lives in the backend policy for each tool, enforced outside the model, with the session's real identityRequest each privileged action with preconditions deliberately unmet; the pass bar is a blocked call, not a polite refusalLLM03
Human handoffUse the bot to inject content into the agent-facing transcript or summary, so the human inherits false context ("the bot already verified me")Handoff summaries label machine-generated and customer-claimed content separately; verification state transfers from the backend, not the transcriptEscalate mid-attack and read what the human sees; test whether claimed identity or claimed promises survive into the summaryLLM02
Rate limits and scripted abuseRun the attack at volume: enumerate order numbers, farm discount codes, probe thousands of phrasings for one that landsPer-session and per-IP rate limits, bot detection on the widget, anomaly alerts on repeated near-identical sessionsScript benign-payload volume tests against staging; measure when limits trigger and what the on-call team seesLLM06

Two of those rows get their own sections below. They're the ones voice-trained teams miss most.

Indirect prompt injection is the chat-native attack

A voice attacker says the attack out loud, live, one call at a time. A chat attacker doesn't have to show up at all. They leave the attack lying around somewhere your bot will eventually read it. OWASP's prompt injection guidance calls this indirect prompt injection: the model accepts input from external sources, and content inside that input alters its behavior.

For a support chatbot, "external sources" means the retrieval pipeline you built on purpose. Knowledge base articles. Policy pages. Past tickets, product reviews, community posts. Each of those corpora has authors, and far more people can write into them than can edit the system prompt. A poisoned review, a hostile ticket later surfaced as a "similar case," a public page edited after your last index refresh: every one of these is a message to your bot, and no input filter on the widget will ever see it.

The scenario shape to test looks like this. A customer asks a routine product question. The top retrieved document carries instruction-shaped text telling the agent to disclose its instructions or offer a discount. The control that should hold is the data-instruction boundary: the agent quotes and summarizes retrieved content, and never obeys it. Build poisoned fixtures into your test index and run the retrieval path end to end. Pasting hostile context straight into the model is a different, weaker test, because the real pipeline includes the retriever, the ranking, the prompt assembly and the citation renderer, and each step changes what the model sees.

Citations double the stakes. A support bot that cites its sources lends the company's name to whatever it cites, so an attacker who gets planted content retrieved and cited has the brand vouching for the attacker's page. Check every rendered citation during the poisoned-fixture runs.

The output is an attack surface because the browser renders it

A voice agent's output is audio, and its blast radius runs through what it says and the tools it calls. A chat widget adds a surface voice never has: its output is markup rendered in your customer's browser, under whichever origin the widget runs in: the host page's for an inline widget, the vendor's for an iframe, which changes the XSS blast radius but not the duty to test it. OWASP LLM10, Improper Output Handling, names the failure directly: JavaScript or markdown generated by the model and interpreted by the browser results in cross-site scripting.

That's why three tests belong in every chat red team:

  1. Link discipline. Push the agent to emit links, then check whether the widget allowlists destinations. The request is "send me the link to fix this." The protected asset is the customer's trust in links under your brand; the control is domain allowlisting in the renderer. A bot that renders attacker-steered URLs is a phishing tool with your logo on it.
  2. Remote image loads. Markdown image syntax makes the browser request a URL the model composed. If model output can place data in that URL, and the widget loads remote images, conversation content walks out through the image fetch. The control is blocking remote loads from non-allowlisted hosts. Test it by inspecting network traffic from the rendered widget, not by reading the bot's text.
  3. Raw HTML and script. Check that the renderer escapes or strips HTML in model output. Chat teams skip this one because the output "comes from our own model." After the RAG section above, you know better: treat model output as attacker-influenced by default. OWASP's first mitigation for LLM10 says it plainly: treat the model as any other user and validate responses coming from it.

Tool calls and handoff: test the action path with the preconditions unmet

The highest-severity chat findings are rarely eloquent jailbreaks. They're tool calls that went through without their preconditions. OWASP LLM03, Excessive Agency, puts the root cause in excessive functionality, excessive permissions and excessive autonomy, and puts the fix in the backend, not the prompt.

For each tool behind the chat agent (order lookup, refund, credit, address change, cancellation, export), write one scenario per precondition. The request names the action. The protected action is the tool call itself. The control is the backend policy that checks identity, eligibility and limits no matter what the conversation said. Run each scenario with exactly one precondition unmet; the pass bar is a call blocked by policy, with the block visible in the tool trace. A refusal in prose with no policy check behind it fails. A refusal is model behavior, and model behavior is exactly what the attacker gets to influence.

Handoff is the tool call teams forget. When the bot escalates to a human, it hands over a summary, and the human extends trust to that summary. So run a session where the attacker claims to be verified, claims a promise was made, or asks the bot to note false account details. Then escalate and read the agent-facing view. The control that should hold: verification state and account facts come from the backend record, and customer-claimed content is labeled as claimed.

Reuse the voice method; respect the chat differences

Hamming's voice red teaming method transfers to chat almost whole. It was never really about audio. Four pieces carry over directly:

  • Scenario generation from the agent's real jobs. Build attack scenarios from the prompts, policies, tool inventory and observed traffic of the actual agent. Coverage then follows what the agent can do, not what a generic list contains.
  • Holistic scoring. Score the whole conversation and its side effects against policy. Turn-by-turn string matching will miss the attack that succeeds politely over eight turns.
  • Rerun after the fix. A finding closes when the same attack reruns against the fixed configuration and the result gets recorded. Not when the ticket is marked done.
  • Regression coverage. Every confirmed failure becomes a permanent test that runs on every prompt, model, tool or index change. That's what makes red teaming continuous rather than a point-in-time pen test. The agent changes weekly; the suite has to outlive each change.

Four things genuinely differ in chat, though:

DifferenceWhat it changes in the test plan
No audio layerDrop ASR stress, accents, noise and interruption tests; the input is already text, so phrasing variation and encoding tricks replace acoustic variation
Persistent artifactsTranscripts, uploads and session state outlive the conversation; add retention, cross-session leakage and transcript-access tests
Rendered outputAdd the LLM10 battery: link allowlisting, remote image policy, HTML escaping, verified in the DOM
Cheap volumeA chat attacker scripts thousands of sessions for the cost of one phone call; add rate limiting, bot detection and anomaly alerting to the scope, and test them

The evidence packet changes shape too. A voice finding ships with audio, transcript and tool trace. A chat finding ships with more: the full session, the retrieval trace (which documents got fetched, what they contained), the rendered output as the browser displayed it, the tool trace, the session's auth state. Can't reconstruct what the bot retrieved on a given turn? Fix the logging before expanding the attack list.

The Gap incident is the argument for testing the deployed configuration

In December 2025, The Information reported, via eMarketer, that users got Gap's new support chatbot talking about topics far outside its intended scope shortly after launch. The agent vendor put it down to a bad actor who had been attempting to jailbreak over a dozen of its clients' agents. Its abuse detection intercepted the attempts everywhere except Gap, where the agent's guardrails had been "inadvertently misconfigured." They have since been corrected.

Read it as a red team lesson and every detail earns its place. The vendor's control existed. It worked for other clients, so a capability review of the platform would have passed. The failure was configuration, on one deployment, and the first party to test that deployment adversarially was the attacker, running the campaign across more than a dozen targets at once. That's scripted chat abuse in practice: cheap, parallel, indifferent to which deployment turns out to be the soft one.

Three operational conclusions follow. Red team the deployment you shipped, not the platform's demo. Rerun the suite after every configuration change. And when your vendor says guardrails are handled, ask who tested your configuration of them, and when. The guardrails analysis covers that conversation in full.

Run it as a program: the pre-launch and steady-state loop

A single engagement produces a report. A program produces a shrinking attack surface. Here's the loop that works:

  1. Scope. Fill in the attack-surface table for your deployment: surfaces, tools, data classes, auth states, retrieval corpora. Strike what doesn't apply and write down why.
  2. Generate. Build scenarios per surface from the agent's own prompts, policies and tools, covering each OWASP category the scope touches. Payload-grade material lives in a private, access-controlled corpus.
  3. Execute. Run the suite against staging with production-shaped data, and against production configuration before launch. Include scripted-volume tests with benign payloads.
  4. Score. Judge conversations and side effects against policy. Count critical findings (data disclosure, unauthorized tool action, rendering escape) separately. One of those blocks launch, whatever the overall pass rate says.
  5. Fix and rerun. Fix the layer that failed. Rerun the same attack. Record the result.
  6. Freeze into regression. Every confirmed finding becomes a permanent regression test that runs on every prompt, model, tool, guardrail or index change.
  7. Monitor. Watch live conversations for the same attack patterns in production, and route hits into the regression suite. Detecting agent attacks in production covers the runtime signals.

Steps 1 to 6 before launch are a gate. Steps 5 to 7, forever after, are the program. An agent that changes with every prompt, model, tool and vendor update needs continuous red-teaming, not a point-in-time pen test. The suite frozen in step 6 doubles as audit-ready evidence for security, risk and model governance reviews.

Frequently asked questions

Start by enumerating the full attack surface: widget session and auth state, direct messages, RAG-grounded content and citations, file uploads, response rendering, tool calls, human handoff, and scripted volume. Then write defensive scenarios per surface and score whole conversations against policy, not single turns. Hamming reruns every attack after the fix and freezes each confirmed finding into a regression suite that runs on every prompt, model, tool or index change.

The whole path, not the message box: the anonymous or authenticated widget session, the documents the bot retrieves and cites, file and image uploads, the markdown and links the widget renders, the tools behind the conversation, the handoff summary a human inherits, and the rate limits that cap scripted abuse. Hamming maps each surface to the OWASP LLM Top 10 for 2026 and tests the deployed configuration rather than the vendor's demo.

The method transfers whole: scenario generation from the agent's real jobs, holistic scoring, rerun after fix, regression coverage. The surfaces change. Chat drops the ASR and audio layer, then adds persistent transcripts, file uploads, rendered markdown and links in the browser, and attack volume that costs nothing to script; Hamming red-teams voice, chat, SMS and email agents with one method and a channel-specific surface list.

An attack delivered through content the bot retrieves and trusts, such as a poisoned review, ticket or knowledge-base page carrying instruction-shaped text, rather than through the chat message itself. Widget-side input filters never see it. The test seeds the index with poisoned fixtures and verifies end to end that the agent quotes retrieved content as data and never obeys it.

The widget renders model output as markup in the customer's browser, under whichever origin the widget runs in (host page or vendor iframe). Unvalidated links enable phishing, remote image loads can carry conversation data out in the URL, and unescaped HTML can become cross-site scripting, which OWASP tracks as LLM10, Improper Output Handling. That's why the test inspects the rendered DOM and network traffic, not just the bot's text.

For each tool (refund, credit, address change, cancellation, export), run scenarios with exactly one precondition unmet and require that the backend policy blocks the call, visible in the tool trace. A polite refusal in prose with no policy check behind it fails, because model behavior is what the attacker influences. Hamming also tests the handoff path, checking that claimed identity and claimed promises arrive in the human agent's summary labeled as unverified claims, never as established fact.

Per The Information's reporting via eMarketer, the agent vendor's abuse detection held for its other clients, but Gap's guardrails had been inadvertently misconfigured, and an attacker found that one deployment before any test did. Hamming draws three lessons from it: red team the configuration you shipped, rerun the suite after every change, and never treat a vendor capability review as proof your deployment is covered.

After every prompt, model, tool, guardrail configuration or retrieval index change, before launch, and after any production incident. The agent changes continuously, so a control that held last month is one settings change from not holding. Hamming runs this as continuous red-teaming with monitoring on live conversations, not a point-in-time pen test.