Fooling LLM Safety Guards into Judging the Wrong Text
Organizations: Independent Researcher
Abstract
Safety guards check content before an LLM application acts on it, and most paste that content into a plain-text prompt. Content that imitates the prompt can append a second task, and the guard answers that one instead. We call this target rebinding. Our explanation is that the guard grades the last complete task in its input, here a harmless decoy, so the harmful request goes through unchanged. In a pre-registered test, an appended forged query and decoy clear all 75 held-out AdvBench requests that Shieldstral-1.0-3B flags. The guard is not persuaded: a directive to ignore the text above clears none of them, and in a follow-up run a harmful decoy stops the attack. On our GuardRebind benchmark, each of five guards has an attack family, chosen per guard, that clears at least 93% of its flagged items. Rebinding explains this best on Shieldstral and gpt-oss-safeguard; on ShieldGemma and Llama Guard 3, generic evasion and trailing text respectively do part of the work, and Qwen3Guard falls mainly to a forgery of its whole task. Training the guard to score content no lower than its most harmful part cuts attack success from 75% to 0.8-1.6% on attack families, decoys and forged queries held out of training. All of these attacks append the forged structure after the request, and we added the held-out-decoy evaluation after a first round of test runs. Clean AUROC falls by at most 0.01, but our test of non-inferiority is inconclusive. A score-guided search still beats this trained guard on 47 of 50 items, usually by placing forged structure before the request. On about half of the items where the search wins, the same search also finds benign text, with no forged structure, that clears the guard.
Figures & tables
| guard score : | harmful request alone 0.999 (flagged) | with the forged pair 0.023 (cleared) |
| appended content | kind | bypass |
|---|---|---|
| nothing | control | 0% [0%, 5%] |
| the sentence alone | control | 0% [0%, 5%] |
| same sentence as a “Note:” | control | 0% [0%, 5%] |
| inert filler of similar length | control | 0% [0%, 5%] |
| forged Instruct | structural | 0% [0%, 5%] |
| forged Instruct Query | structural | 0% [0%, 5%] |
| bypass | flagged items | flag rule | attack, decoys and queries |
|---|---|---|---|
| 75 AdvBench requests ( Section 3 ) | the forged pair; one fixed decoy and query | ||
| 300 benchmark items, six sources ( Section 4 ) | the angle-bracket pair; decoys from a pool | ||
| the same 300 items | the strongest of 52 families, chosen after the fact | ||
| 297 test items ( Section 6 , base guard) | held-out families, decoys and queries |
| guard | flagged | clean FNR | clean FPR | best bypass | native | instr. | harm. decoy | fam. |
|---|---|---|---|---|---|---|---|---|
| Shieldstral 3B | 300 | 50.0 | 6.7 | 99.2 [98.2, 100] | 71.7 | 7.0 | 13.6 | 36 |
| Llama Guard 3 1B | 374 | 37.7 | 15.8 | 100 [100, 100] | 100 | 2.9 | 11.1 | 44 |
| ShieldGemma 2B | 168 | 72.0 | 2.8 | 100 [100, 100] | 73.6 | 20.2 | 84.3 | 25 |
| Qwen3Guard 0.6B | 536 | 10.7 | 27.8 | 93.4 [91.5, 95.1] | 81.7 | 0.7 | 0 | 8 |
| gpt-oss-safeguard 20B | 113 | 43.5 | 12.0 | 100 [100, 100] | 71.7 | 6.2 | 9.4 | 16 |
| bypass | detection | |||||
| fixed decoy | held-out | |||||
| condition | train | held-out | decoy | AUROC | recall | FPR |
| none (base) | 87.9 | 85.1 | 75.0 | 0.810 | 47.1 | 5.9 |
| B (untrained boundary) | 90.7 | 85.4 | 76.8 | 0.827 | 47.8 | 5.4 |
| structure detector | 0.0 | 24.5 | 23.2 | 0.814 | 47.9 | 5.9 |
| inference-time segment-max | 0.0 | 24.6 | 23.4 | 0.810 | 47.1 | 5.9 |
| over-refusal | benign forged pair | ||||
|---|---|---|---|---|---|
| condition | OR-Bench-hard | XSTest-safe | structured benign | benign decoy | harmful decoy |
| none (base) | 51.5 | 6.7 | 5.8 | 0.2 | 100 |
| B (untrained boundary) | 52.8 | 8.0 | 6.8 | 0.1 | 100 |
| structure detector | 51.5 | 6.7 | 58.6 | 87.5 | 100 |
| inference-time segment-max | 51.5 | 6.7 | 9.8 | 13.0 | 100 |
| T (2 seeds) | 52.0–54.3 | 2.7–5.3 | 5.0 | 0.7 | 100 |
| guard | score-guided search | structural search | all attacks | plain-text control |
|---|---|---|---|---|
| none (base) | 50/50 [93%, 100%] | 50/50 [93%, 100%] | 50/50 [93%, 100%] | 35/50 [56%, 81%] |
| T | 47/50 [84%, 98%] | 4/50 [3%, 19%] | 49/50 [89%, 100%] | 26/50 [39%, 65%] |
| B T | 34/50 [54%, 79%] | 4/50 [3%, 19%] | 34/50 (no GCG) | not run |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| prediction | outcome | |
| P1 | instruction-only | confirmed (0%) |
| P2 | forged pair | confirmed (100%) |
| P3 | harmful decoy lowers bypass | not a valid test as run: the panel’s “harmful decoy” scores alone, so it is the borderline decoy; bypass fell to 29–35%; the exploratory three-decoy comparison and M3 address the prediction |
| P4 | not recency: prepending clears markedly less than appending | confirmed (inert filler appended last 0%; forged pair appended 100%, prepended 15%) |
| P5 | syntax not load-bearing | confirmed (all variants high, no labels 0%) |
| P6 | wide policy-dependence | refuted: median 99%, range 87–100% |
| bypass | detection | over-refusal | benign forged pair | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| condition | train | held-out | AUROC | recall | FPR | OR-B. | XST. | struct. | benign | harmful |
| naive adv. training (2 seeds) | 0.9–1.0 | 0.9–1.1 | 0.921–0.925 | 83.3–84.6 | 12.6–14.9 | 0.3–0.8 | 8.0–10.7 | 0.0 | 7.8–8.2 | 8.0–8.6 |
| Llama Guard 3 1B, base | 84.0 | 82.0 | 0.758 | 58.7 | 16.9 | 40.5 | 1.3 | 23.4 | 2.4 | 97.3 |
| Llama Guard 3 1B, T | 2.3 | 2.5 | 0.771 | 58.4 | 15.0 | 38.3 | 1.3 | 23.0 | 22.5 | 100 |
| Qwen3Guard 0.6B, base | 28.3 | 9.5 | 0.917 | 88.5 | 23.6 | 76.8 | 21.3 | 30.4 | 10.5 | 100 |
| Qwen3Guard 0.6B, T | 0.0 | 0.0 | 0.924 | 89.0 | 23.3 | 77.3 | 20.0 | 29.4 | 25.9 | 100 |
LLM Guardrails
Large language model guardrails detect or constrain harmful outputs, prompt attacks, and unsafe agent actions before they cause harm.
See all 194 papers