Skip to content

Analysis4 min read

AI chatbot providers: what we find when we test the platform, not the bot

A chatbot platform is not one bot, it is thousands of bots on shared infrastructure with customer-authored prompts and customer-connected data. That changes the threat model completely.

Sameer

Founding Engineer

Hands typing on a laptop keyboard at a desk
Photo: Simon Hattinga Verschure (CC0, via Wikimedia Commons)

Testing a chatbot is a small job. Testing a chatbot platform — where thousands of customers configure their own bots, write their own system prompts, connect their own knowledge bases and embed the widget on their own domains — is a different exercise entirely, and the findings are rarely about the conversation.

The interesting surface is the configuration plane, the widget delivery path, and the shared infrastructure underneath. Here is what we look at, in the order it has produced findings.

The widget is a public credential problem

Embedded widgets need an identifier in client-side code, and that identifier is public by definition. Everything then depends on what it authorises.

  • Bot ids that double as API keys. We find these regularly: the embed snippet contains a token that also works against the management API, so anyone who views source on a customer’s website can read or modify that bot’s configuration.
  • Missing origin validation. If the widget key works from any origin, the bot can be lifted onto an attacker’s page and used as a free, authenticated proxy to the customer’s model budget and knowledge base.
  • Enumerable bot identifiers. Sequential or short ids let an attacker walk the platform, discovering bots and the knowledge bases attached to them. We have found staging bots connected to production data this way.
  • No per-visitor rate limiting. Unmetered inference on someone else’s account is a direct financial attack, and it is the one customers notice first.

System prompt extraction, and why "it is not a secret" is wrong

Customers put real things in system prompts: internal policy, pricing logic, escalation rules, API endpoints, occasionally credentials. The honest answer is that a system prompt sent to a model alongside user input cannot be kept secret from a determined user — we extract them reliably in testing, through role-play framing, translation and summarisation requests, encoding tricks, and simply asking in a language the refusal was not tuned for.

The platform obligation is therefore twofold: make extraction hard enough to deter casual attempts, and tell customers plainly in the product that the prompt is not a vault. The failure mode we report is not "the prompt was extracted" — it is a platform that implied the prompt was confidential and so encouraged customers to put secrets in it.

Customer-authored prompts are untrusted code

On a chatbot platform, the customer writes the system prompt. That makes it attacker-controlled input to your infrastructure, not just to their bot.

  • A system prompt that can reference template variables may be able to reach variables belonging to the platform rather than the bot. We test for template injection here as rigorously as in any server-side rendering engine.
  • If a prompt can specify a webhook, tool endpoint or fetch target, you have server-side request forgery authored through a text box in a settings page. Cloud metadata endpoints are the first thing we try.
  • Bots with file-upload or document-ingestion features inherit every parser vulnerability in the pipeline, and the ingestion worker usually runs with broader credentials than the web tier.

What we test, in order

  1. Take the embed snippet and establish exactly what the public key authorises, from an unrelated origin.
  2. Attempt bot enumeration and cross-account configuration reads and writes.
  3. Extract the system prompt through at least six distinct framings, and report the success rate rather than a binary.
  4. Test customer-authored prompts for template injection and outbound request control.
  5. Walk the knowledge-base path: upload parsing, storage location, cross-account retrieval, and whether deletion deletes embeddings as well as files.
  6. Measure rate limits and spend controls per visitor, per bot and per account.
  7. Check conversation log handling: retention, access from the support console, and whether transcripts containing personal data are exportable by the right people only.

Controls that hold up

  • Widget keys scoped to one bot, one capability — chat only — and validated against an allowlist of origins the customer registers.
  • A separate, secret-bearing management API that the widget never touches.
  • Per-visitor and per-account quotas with hard spend ceilings, because the alternative is finding out from an invoice.
  • Prompt rendering that treats customer text as data, with no template evaluation and no network targets derived from it.
  • Knowledge bases in per-account storage with per-account retrieval filters, and deletion that removes the embeddings.
  • An honest in-product note that system prompts are not confidential, placed where a customer writes one rather than buried in documentation.

What buyers and regulators are asking

Chatbot platforms sit in an awkward position under India’s DPDP Act: for conversation transcripts containing end-user personal data, the customer is usually the Data Fiduciary and the platform the Data Processor, which means contractual obligations, breach notification duties flowing to the customer, and deletion that actually propagates. Enterprise customers increasingly ask for the transcript retention period, the sub-processor list including the model provider, and evidence that one customer’s conversations cannot be retrieved by another.

Where to start

Open the browser console on your own marketing site’s widget, copy the key, and try it from a scratch HTML file on localhost. What works tells you what an attacker has. Most platforms we test are surprised by the answer.

Questions we get asked

Can a chatbot system prompt be protected from extraction?
It can be made harder — instruction hierarchies, refusal tuning, output filters that drop verbatim prompt text — but not guaranteed. Treat the prompt as public and keep secrets, credentials and policy you would not publish out of it.
Our bots are isolated by account. Is that enough?
It depends where the isolation lives. Account isolation in the application tier with a shared vector namespace underneath is the most common cross-tenant finding we report. The isolation needs to be in the retrieval query and the storage layout, not only in the UI.
How do we stop people using our customers’ bots as a free LLM?
Origin validation on the widget key, per-visitor rate limits, bot-level and account-level spend caps, and anomaly alerting on token consumption. Expect abuse to be automated, so the limits need to work without a human in the loop.
  • AI chatbot security
  • chatbot platform penetration testing
  • system prompt extraction
  • LLM security for chatbot providers
  • conversational AI security