Skip to content
AI / LLM Write-up Beginner

Breaking The Pattern How Simple Rewording Defeated An Llms Guardrails

The LLM's guardrails blocked a specific prompt injection phrase but allowed the same harmful output when the instruction was reworded. An attacker could bypass the safety mechanism to make the model produce a chosen phrase.

Charitha Jeewanka Follow

Published on systemweakness.com

Large Language Models (LLMs) are increasingly deployed in customer-facing chatbots. These systems are often wrapped in “guardrails” AKA safety mechanisms designed to prevent them from producing harmful, brand damaging, or policy violating responses.

Charitha Jeewanka, on systemweakness.com

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 guardrail relied on matching the exact injection phrase rather than isolating instructions from user input.

Impact

An attacker could bypass the LLM's guardrails to make it produce a specific phrase, potentially leading to brand damage or policy violations.

What the attacker needed

Access to a public LLM chatbot

The fix

Guardrails should use deeper instruction isolation so that system and developer prompts cannot be overridden by user input, rather than relying on pattern matching.

How it was found

  1. Send a classic prompt injection asking the model to ignore previous instructions and say a specific phrase.
  2. Observe that the model complies and outputs the phrase.
  3. Try a more sensitive phrase and see the model refuse, indicating phrase-based moderation.
  4. Repeat the original injection and note the model now refuses, suggesting session-level tightening.
  5. In a fresh conversation, reword the instruction in several ways (translation, role-play, minimal instruction, story framing, fill-in-the-blank, fictional output).
  6. Observe that every reworded prompt successfully makes the model output the target phrase.

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 prompt injection is when a user sneaks instructions into a chatbot to make it do something it should not. Here, the chatbot's safety filter only looked for one exact phrase, so changing the wording let the same bad instruction through.

What is AI / LLM?

Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.

Similar reports

View all

Same bug class and techniques, clearest first.

AI and LLM vulnerabilities

The lesson behind this report.

Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.