Unmasking Harmful Content in a Medical Chatbot: A Red Team Perspective
A medical insurance chatbot could be manipulated through jailbreak prompts to produce harmful and offensive content, including instructions for making illegal substances. The attacker could bypass the bot's content filters, but no sensitive data or system access was obtained.
Published on synack.com
During a recent web assessment as part of a Synack Red Team engagement, I discovered a notable problem in a chatbot deployed on a platform associated with a healthcare company. This blog will provide an in-depth analysis of the techniques used to uncover this vulnerability, why it poses a potential risk and how…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the chatbot's content filters relied on simple keyword checks that could be evaded by encoding or rephrasing prompts, and the model lacked robust safeguards against jailbreak instructions.
What the attacker needed
Access to the chatbot interface
The fix
Developers should implement robust content safety mechanisms and conduct ongoing red teaming to identify and mitigate such vulnerabilities.
How it was found
- Ask the chatbot about its purpose and capabilities to understand its scope.
- Send a 'Master Key' prompt designed to bypass restrictions and request uncensored outputs.
- Combine the Master Key with a benign question about a harmful topic to escalate gradually (Crescendo technique).
- Base64-encode the Master Key prompt to bypass keyword checks and resend it.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A chatbot is a computer program that talks with people. This one was supposed to answer only health insurance questions, but a tester tricked it into giving dangerous information, like how to make a bomb or drugs. The trick worked because the chatbot's safety rules could be bypassed with clever wording.
What is AI / LLM?
Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.