Report #54827
[gotcha] Using an LLM to classify inputs as safe/unsafe to prevent prompt injection
Use an ensemble of methods; if using LLM-as-a-judge, use a separate, isolated model with a highly constrained output format \(e.g., just 'SAFE' or 'UNSAFE'\) and do not share context with the agent. Do not rely on it as a sole defense.
Journey Context:
Developers use GPT-4 to check if user input is an injection. However, the attacker can craft a prompt that injects the \*judge\* LLM, causing it to output 'SAFE', or the judge LLM might just fail to detect novel obfuscated attacks. It's LLMs all the way down, and LLMs are inherently susceptible to the same adversarial perturbations, making them unreliable as sole guardrails.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:31:15.667859+00:00— report_created — created