Join our Newsletter — 33% off our NHI Course
Home› Guides› Customer-Facing Chatbot Security: Protecting Conversational AI, Its Data…
Guide LLM & GenAI Security

Customer-Facing Chatbot Security: Protecting Conversational AI, Its Data and Its Users

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 14 min read
On this page

A chatbot you put in front of customers speaks for your organisation, reads your data and, increasingly, takes actions on real accounts, yet anyone on the internet can talk to it and try to make it misbehave. This guide is about securing conversational AI that an organisation builds or deploys for its own customers: support assistants, sales bots, booking and account helpers. It does not cover staff use of public chatbots, which is covered in the Safe Use of AI Chatbots Guide. It is written for product security and AI engineering leads who own the threat model, the architecture and the launch decision. The core idea throughout: the model is an untrusted component, so the things that matter (who the customer is, what they may see, what can be changed) are enforced in code around it.

Key takeaways

  • Treat every message as hostile input. Public users will try prompt injection and jailbreaks on day one, so limits written only in the system prompt will eventually be talked around.
  • Keep decisions out of the model. Identity checks, prices, refunds, eligibility and account changes belong in back-end services the bot calls but cannot override.
  • Scope tools to the authenticated customer. Each tool call should carry the customer's own session and only reach that customer's records, with high-impact actions gated by step-up verification or a human.
  • Log conversations, but treat the logs as personal data. Transcripts are evidence for incidents and disputes, and also a store of PII that needs redaction, access control and a retention limit.
  • Disclose, hand off and be ready to switch it off. Tell users they are talking to AI, give them a route to a human, and have a tested kill switch before launch.

Threat model for customer chatbots

A customer chatbot differs from an internal assistant in three ways: the user population is anonymous or weakly authenticated, users are motivated to extract value (discounts, refunds, other people's data), and every reply is effectively a public statement by the organisation. In February 2024 a Canadian tribunal held Air Canada liable for a bereavement fare policy its website chatbot described wrongly, rejecting the argument that the bot was a separate entity (see the Air Canada chatbot ruling). Start with an architecture diagram that shows every trust boundary: browser widget, chat API, orchestration layer, model provider, retrieval store, tools and back-end systems, and the logging pipeline. Then walk the threat classes below for each boundary. The AI Agent Threat Modelling Guide covers the method in depth.

OWASP Top 10 for LLM Applications 2025 mapped to customer chatbots

OWASP 2025 riskHow it shows up in a customer chatbotPrimary control
LLM01:2025 Prompt InjectionUser tells the bot to ignore its rules; instructions hidden in an uploaded file, web page or knowledge articleBusiness rules enforced outside the model; untrusted content separated from instructions; output checks
LLM02:2025 Sensitive Information DisclosureBot reveals another customer's order, internal notes or PII from its contextRetrieval and tools filtered by the authenticated customer; PII redaction on output and logs
LLM03:2025 Supply ChainThird-party chatbot platform, plug-in or model update changes behaviour without noticeVendor contract terms, version pinning, regression tests after every update
LLM04:2025 Data and Model PoisoningPoisoned help-centre content or fine-tuning data steers answersChange control and review on knowledge sources; provenance on fine-tuning data
LLM05:2025 Improper Output HandlingBot output rendered as HTML or passed into a query or URL, enabling XSS or injectionEncode output for its destination; never execute or render model output unsanitised
LLM06:2025 Excessive AgencyBot can issue refunds, change emails or cancel orders on requestLeast-privilege tools, per-action authorisation, human approval for high impact
LLM07:2025 System Prompt LeakageUser extracts the system prompt, which contains discount rules or credentialsNo secrets or rules that matter in the prompt; assume it is public
LLM08:2025 Vector and Embedding WeaknessesShared vector index returns another tenant's or customer's documentsPer-tenant indexes or metadata filters enforced server-side
LLM09:2025 MisinformationConfident wrong answers on prices, policy or eligibilityAnswers grounded in approved sources; fixed responses for policy questions
LLM10:2025 Unbounded ConsumptionScripted traffic or very long prompts drive model cost and outagesRate limits per session and IP, input length caps, spend alerts

Each risk has its own guide on this site, for example the OWASP LLM Top 10 LLM06 Excessive Agency Guide and the OWASP LLM Top 10 LLM09 Misinformation Guide. In MITRE ATLAS the matching techniques include AML.T0051 LLM Prompt Injection, AML.T0054 LLM Jailbreak, AML.T0056 Extract LLM System Prompt and AML.T0057 LLM Data Leakage, which are useful labels for red-team findings and detections.

Prompt injection and jailbreaks

Prompt injection cannot be fully prevented with today's models, so design for containment rather than for a perfect filter. In December 2023 a dealership sales bot was talked into "agreeing" to sell a car for one US dollar because nothing outside the model checked its commitments (see the Chevrolet dealer chatbot incident). In January 2024 a parcel firm disabled the AI element of its chat after a customer got it to swear and criticise the company, which the firm attributed to a system update (see the DPD chatbot incident).

  • Constrain the job: define the topics the bot serves and refuse the rest. Topic classifiers on input and output keep a support bot from writing code, poems or opinions about competitors.
  • Separate instructions from data: wrap retrieved documents, uploaded files and tool results as clearly marked untrusted content, and never let them change tool permissions. Indirect injection through a poisoned knowledge article is harder to spot than a user typing "ignore previous instructions".
  • Enforce commitments in code: prices, discounts, refunds and contractual statements come from a system of record through a tool, not from generated text. If the bot must state a policy, return the approved wording verbatim.
  • Check the output: run a moderation and policy check on every reply before it reaches the customer, blocking abusive content, off-topic answers, URLs outside an allow-list and anything that looks like a commitment the bot is not allowed to make.
  • Red-team every change: rerun an injection and jailbreak test suite after every model, prompt, retrieval or vendor platform update, not only before launch. See the AI Red Teaming Guide.

Guardrail products help with input and output screening; the AI Guardrails and AI Firewalls Guide covers how they work. They are a probabilistic layer, not a substitute for authorisation.

Data leakage and PII handling

A customer chatbot handles personal data in four places: the conversation itself, the context it retrieves, the tool results it receives and the logs you keep. NIST AI 600-1, the Generative AI Profile of the AI Risk Management Framework, lists Data Privacy and Information Security among its twelve generative AI risks, alongside Confabulation and Human-AI Configuration, which map directly onto chatbot failures.

  • Minimise what enters the context: fetch only the fields needed for the question (order status, not full payment history) and mask card numbers, government IDs and authentication secrets before they reach the model.
  • Filter retrieval by identity: apply the customer or tenant filter in the retrieval service, not in the prompt. A shared vector index queried without a server-side filter is a cross-customer leak waiting to happen.
  • Know where the data goes: confirm the model provider's retention and training terms for your API tier, the region of processing and any sub-processors. The LLM Data Retention and Training-Use Policies by Provider page tracks provider terms.
  • Run a DPIA: under UK and EU GDPR a chatbot processing personal data at scale is a typical case for a data protection impact assessment. The ICO's guidance on AI and data protection covers DPIAs, minimisation and transparency for AI, and notes that it is under review following the Data (Use and Access) Act.

Tool and action permissions

The biggest shift in risk comes when a chatbot stops answering questions and starts doing things. Every tool it can call is a non-human access path into your systems, so treat the bot's service identity and its tools like any other privileged integration. See the OWASP LLM Top 10 LLM06 Excessive Agency Guide for the underlying risk.

Action tierExamplesMinimum control
Read public informationOpening hours, product facts, help articlesAnonymous access; rate limits
Read the customer's own dataOrder status, booking details, balanceAuthenticated session; tool enforces record ownership from the session, never from a model-supplied ID
Low-impact changeUpdate delivery note, resend receipt to the address on fileAuthenticated session; confirmation step shown to the user; audit log
High-impact changeRefund, cancellation, address changeStep-up verification or human approval; value limits enforced in the back end
Credential or recovery changeChange email, phone, password or MFANot available to the bot, or only through the standard recovery flow with an existing verified factor
  • Pass the customer's authority, not the bot's: tools should act with a token bound to the customer's session and scoped to their records. A single all-powerful service account behind the bot turns any injection into broad data access.
  • Validate parameters server-side: the model chooses tool arguments, so the tool must check them (record belongs to caller, amount within limit, action allowed in this state).
  • Keep tool credentials out of the prompt: API keys for back-end systems live in the orchestration layer's secrets store, never in the system prompt or retrieved context. See the API Key Management Guide.

The Meta AI support assistant case in 2026 shows why recovery changes need the strictest tier: the assistant sent reset links to an email address supplied by the requester, without checking it matched the account, and Meta's filing listed 20,225 people affected. Accounts with two-factor authentication were not taken over (see the Meta AI Instagram account takeover). The Account Recovery and Help Desk Security Guide applies to bots as much as to human agents.

Authentication and session handling

Decide early which conversations need a logged-in customer. Anonymous chat is fine for public information; anything that touches an account should run inside the customer's existing authenticated session rather than asking for identifiers in the chat.

  • Reuse the web or app session: pass the authenticated session to the chat back end and derive the customer ID from it. Never let the user or the model assert who the customer is ("my account number is ...").
  • Never collect secrets in chat: passwords, one-time codes and full card numbers should not be typed into the conversation. Use the normal login or payment pages and return to the chat.
  • Step up for risk: trigger re-authentication or a passkey prompt before high-impact actions, as you would in the main application. See Continuous Authentication vs Step-Up Authentication.
  • Bound the session: expire idle chat sessions, end them at logout, and bind conversation IDs to the session so a leaked conversation link cannot be replayed by someone else.
  • Protect the widget: serve it with a strict Content Security Policy, encode model output before rendering, and check origins on the chat API.

Human handoff and disclosure

A route to a person is a security and safety control as well as a service feature. It is the escape hatch when the bot cannot help, when a customer is distressed or vulnerable, and when a request falls into a tier the bot must not handle.

  • Define triggers: explicit requests for a human, repeated failure to resolve, complaints, legal threats, signs of vulnerability, fraud indicators and any high-impact action outside the bot's tier.
  • Hand over context safely: pass a summary and the transcript to the agent, with PII handled under the same rules as the contact centre.
  • Disclose AI use: Article 50(1) of the EU AI Act requires providers to design systems that interact directly with people so those people are informed they are interacting with AI, unless that is obvious, and Article 50(5) requires the information to be clear and distinguishable at the latest at the first interaction. Rules in California, Utah, Maine and elsewhere differ by trigger and wording and change often; check the AI Disclosure Laws Map and the EU AI Act Article 50 Transparency Obligations Guide before launch in a new market.
  • Avoid false human cues: NIST AI 600-1 suggests tracking anthropomorphisation in interfaces (human imagery, references to feelings). A neutral name and a persistent "AI assistant" label reduce confusion.

Monitoring, abuse and incident response

Most chatbot incidents so far were found by customers posting screenshots, not by the operator. Build the monitoring that lets you find problems first. The LLM Observability Guide covers tooling.

What to log

EventFieldsWhy
Conversation turnsSession ID, customer ID or anonymous ID, timestamps, redacted prompt and reply, model and prompt versionDisputes, incident reconstruction, regression analysis
Tool callsTool name, parameters, authorisation decision, result code, acting identityDetect excessive agency and abuse of actions
Guardrail decisionsInput and output blocks, category, scoreSpot injection campaigns and false positive trends
Handoffs and refusalsTrigger, outcomeMeasure where the bot fails customers
Usage and costTokens per session, requests per IP or accountDetect scripted abuse and cost runaway

Retention: set a fixed period for transcripts based on dispute windows and legal holds, apply it to the vendor platform and the model provider as well as your own store, and restrict access to the people who need it. NIST SP 800-53 AU-11 Audit Record Retention and your data retention schedule are the anchors; see the Log Management and Retention Guide.

Metrics that show the controls work:

  • Share of high-impact actions that passed step-up or human approval (target 100 percent).
  • Red-team suite pass rate per release, and time from a model or platform update to completed regression testing.
  • Guardrail block rate and the share of blocks reviewed, to track injection attempts and false positives.
  • Rate of conversations escalated to humans and the share resolved there, to show the handoff works.
  • Time to detect and time to disable the bot in an exercise, measured against your target.

Incident readiness: keep a kill switch that disables the AI element and falls back to a human or static flow, with a named owner who can use it out of hours, including where a vendor runs the bot. The Public AI Chatbot Incident Playbook and the Prompt Injection Incident Response Playbook cover the response itself.

Framework mapping

AreaNIST SP 800-53 Rev 5NIST CSF 2.0
Least-privilege toolsAC-6 Least PrivilegePR.AA-05
Customer authentication and sessionsIA-8, SC-23 Session Authenticity, AC-12 Session TerminationPR.AA
Input screeningSI-10 Information Input ValidationPR.PS
Logging and retentionAU-2 Event Logging, AU-11 Audit Record RetentionPR.PS-04
Monitoring and reviewSI-4 System Monitoring, AU-6DE.CM-09

Common failure patterns

  • Rules only in the system prompt: discount limits and topic restrictions written as instructions, which users talk around, as in the Chevrolet dealer chatbot incident.
  • The bot makes the identity decision: a support assistant changes recovery details on a plain request because no back-end check stops it, as in the Meta AI support assistant case.
  • Generated policy answers: eligibility and refund rules generated freely rather than returned from approved text, leaving the organisation liable for errors.
  • Untested updates: a vendor or model update ships without regression testing and behaviour changes overnight.
  • One service account for everything: tools run with broad back-end rights, so any injection can reach every customer's data.
  • Transcripts kept forever: full conversation logs, including pasted card numbers, retained indefinitely across the vendor platform and the model provider.

Practitioner checklist

  • Threat model the chatbot across every trust boundary and map findings to the OWASP Top 10 for LLM Applications 2025.
  • Move prices, policy answers, eligibility and identity decisions into back-end services the bot calls.
  • Tier every tool by impact and enforce record ownership, limits and step-up in the tool, not the prompt.
  • Remove secrets and meaningful business rules from the system prompt.
  • Filter retrieval by customer or tenant server-side and redact PII from context, replies and logs.
  • Run account actions inside the customer's authenticated session and never collect passwords or codes in chat.
  • Disclose AI use at the first interaction and provide a human handoff with defined triggers.
  • Set and apply a transcript retention period across your systems, the vendor platform and the model provider.
  • Rerun the red-team suite after every model, prompt, retrieval or vendor update.
  • Test the kill switch and fallback, with a named out-of-hours owner.

Standards and references

Related NHI Mgmt Group resources: Public AI Chatbot Incident Playbook · AI Disclosure Laws Map · AI Agent Threat Modelling Guide · OWASP LLM Top 10 LLM01 Prompt Injection Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.