GUIDE 04 · REMEDIATION

You blocked the jailbreak. Did you fix the vulnerability?

Your developer "fixed" the prompt injection: the exact attack prompt now gets refused. Ship it? Not yet. There's a difference between blocking a prompt and closing a vulnerability — and most fixes only do the first.

The memorization trap

LLM guardrails are pattern matchers. When you block the exact wording of a successful attack, you've often just taught the filter to recognize that string. The underlying weakness — "this bot follows injected instructions" — is untouched. Attackers don't re-use burned prompts; they paraphrase.

What mutation testing does

Take the exact proof-of-concept that beat you, and generate variants:

Reading the result

Run eight mutations. If zero break through, your fix generalized — the class is closed. If half still work, your fix memorized the wording and the vulnerability is wide open. That number is the most honest remediation metric in chatbot security: not "did the test pass," but "how many ways can I still get in."

Make it part of every fix cycle

Verify-fix (re-running the original attack) is necessary but not sufficient. Pair it with mutation: fix, verify the original is blocked, then mutate and confirm the variants die too. ChatBreaker's fix-robustness mutator automates this — eight mutations of your successful finding, re-run against your bot, with a verdict: robust, partial, or fragile.

How the mutator builds its eight variants

ChatBreaker's fix-robustness mutator starts from the finding itself: the exact transcript turns of the proof-of-concept that beat your bot. It applies eight deterministic mutations drawn from the families above — paraphrase, base64 and ROT13 re-encoding, translation of the marker and framing, turn-splitting, framing wrappers, case munging — and re-runs each variant through the same attack engine and judge as the original test. Every mutation keeps its own transcript, and the results page rolls them into one verdict per finding: robust, partial or fragile, with the count stated plainly — "5 of 8 mutations still break through: your fix blocked the wording, not the weakness" is a real shape of result, and it is a much harder sentence to argue with in a review meeting than a severity label. The mutations are deterministic on purpose. A variant generator that improvises would produce a different test every run, and a fix metric you cannot reproduce is a metric you cannot trend. The eight are chosen to cover the transformations real attackers reach for first, which are the same families the ten attack classes catalogue from the other direction.

Worked example: the blocklist that lasted one paraphrase

A fictional travel company, Solmar Voyages, fixed an extraction finding the obvious way: the guardrail team added the successful prompt's distinctive phrase to a blocklist, verify-fix passed, and the ticket closed. The mutation round reopened it in minutes. The paraphrase sailed through — same request, ordinary synonyms, nothing on the list. The Spanish translation sailed through. Turn-splitting sailed through, because the filter inspected single messages. Five of eight variants extracted the same internal note the original had. The real fix was a different kind of change: the bot stopped having conversational access to the note at all, and the data moved behind a tool that checks the caller's booking reference server-side. The mutation round then scored zero of eight, and — the detail that convinced the team — the paraphrase that had embarrassed them now produced a polite offer to help with a booking instead. Same bot, same prompt library; the weakness, not the wording, was gone.

Reading the verdict without fooling yourself

Three rules. First, count concessions as breakthroughs: a mutation that extracts half the note, or gets the bot to confirm the threshold it was fishing for, has advanced the attack, and grading it as a pass is how fragile fixes get signed off. Second, mutate from the strongest finding, not the weakest — the variant space around your worst hole is the space your attacker will explore. Third, keep the mutation transcripts with the finding forever; when the class regresses after a model change, and the model-swap guide explains why it will, the old variants are the fastest regression test you own. Mutation results also feed the drift record: a class that was robust in October and fragile in November is a change-event alarm, whether or not anyone remembers changing anything.

Keep the bar honest in the other direction as well: a mutation that changes the attack's meaning — a paraphrase so loose it asks for something else — is not a breakthrough when it succeeds, and not a pass when it fails. The mutator's transforms are meaning-preserving by construction, which is what makes the count defensible. If you build your own variants by hand, hold them to the same standard: same request, same target data, different surface.

Eight is a floor, not a ceiling: teams with a stubborn class add their own observed production attempts to the variant set.

Frequently asked questions

What is mutation testing for a chatbot fix?

Taking the exact proof-of-concept attack that beat your bot and generating variants of it — paraphrased, re-encoded, translated, split across turns, wrapped in new framing — then re-running them all. If the variants die too, the fix closed the vulnerability; if they break through, the fix only memorised the original wording.

How many mutations should a fix survive?

ChatBreaker's fix-robustness mutator generates eight mutations of the successful finding and re-runs each one. Zero breakthroughs is a robust fix; a minority breaking through is partial; half or more means the vulnerability is still open and the patch was cosmetic.

Is verify-fix not enough on its own?

Verify-fix — re-running the original attack — is necessary but not sufficient. It proves the exact burned prompt is blocked, which attackers already know; they never re-use a burned prompt. Mutation tests the space around the prompt, which is where the next attempt will come from.

When should mutation testing run?

On every fix, as the second half of the fix cycle: fix, verify the original is blocked, mutate and confirm the variants die, then close the finding. A finding closed without the mutation round is a finding waiting to reopen.

Sources