When Safety Becomes a Vulnerability: Exploiting LLM Alignment Homogeneity for Transferable Blocking Attacks in RAGWhen Safety Becomes a Vulnerability: Exploiting LLM Alignment Homogeneity for Transferable Blocking in RAG
TabooRAG transfer-blocking RAG; on NQ, Llama-3-8B surrogate to GPT-5.2 ASR is 83.3%.
The setting is strict black-box. The goal is to induce refusal on benign queries, not incorrect answers. The attacker cannot access the target retriever, generator, or intermediate retrieval results, cannot modify existing documents, and cannot repeatedly probe the target. The knowledge base is partially open, and only one document can be injected per query. An agent model independent of the target can be used for optimization before transfer. Success is defined as the document entering top-k and the generation being judged as a refusal.
- RAG relies on external knowledge bases that third parties can write to, and blocking attacks can make models refuse benign queries. Existing methods rely on adversarial suffixes or explicit instructions, which the authors state weaken on new models, are easy to filter, or require target feedback, making transfer to unknown systems difficult.
- TabooRAG optimizes one document per query in a surrogate RAG, using restricted risk contexts to trigger alignment refusal rather than injecting instructions. A query-aware strategy library reuses verified strategies, and dual-objective filtering requires both retrievability and surrogate refusal, then transfers the document to an unknown target.
- Across nine LLMs and NQ/MS-MARCO/HotpotQA, the authors state that after filtering, ASR is highest across all 27 settings, with a mean of 62.1%. Without filtering, WDoS is higher on eight targets on HotpotQA. Documents transfer across agents and targets, and refusal persists under stronger retrieval pipelines and tested defenses.
- The authors scope the work to English open-domain text QA and third-party injection settings, and list multilingual, multimodal, domain applications, and broader usability benchmarks as future work. Experiments include nine target LLMs, three datasets with 200 queries each, five repetitions, and several retrieval variants and defenses.
- Evaluated models
- Llama-3-8B-InstructMinistral-3-8B-Instruct-2512Gemma-3-12B-itQwen3-32BQwen3.5-9BQwen3.5-35B-A3BDeepSeek-V3.2DeepSeek-V4-ProGPT-5.2
- Benchmarks
- NQMS-MARCOHotpotQAAlpacaJailbreakBench
- Metrics
- ASRASRPGRecallOSR
The researchers propose TabooRAG, a transferable blocking attack against RAG systems: in a proxy RAG environment, they optimize one document per query, then transfer it to an unknown target system, inducing the model to refuse benign queries. The method exploits the overlap among safety-aligned models in risk categories and refusal criteria, which the authors call alignment homogeneity, and does not rely on instruction injection or adversarial suffixes. Across nine LLMs (including GPT-5.2 and DeepSeek-V4-Pro) and three datasets—NQ, MS-MARCO, and HotpotQA—the average ASR after filtering by Prompt-Guard is 62.1%, which is on average 67.3% higher than the strongest baseline in each setting; documents optimized against Llama-3-8B achieve an ASR of 83.3% on GPT-5.2. The attack retains some success rate against stronger pipelines such as hybrid retrieval and reranking, as well as under the evaluated defenses.
Why it was selectedThe paper presents a cross-model transferable RAG blocking attack with success rates across nine models, which can help deployers assess the availability risk posed by retrieval corpus poisoning.
Paper analysis
What problem does this paper attempt to solve?
Under strict black-box settings, the authors use alignment homogeneity to transfer a single risky document to an unknown RAG to induce refusal.
How to make a model refuse benign queries with a single document under strict black-box, where the target RAG cannot be accessed or repeatedly probed.
- Scenario: The authors argue that RAG relies on external knowledge bases, and third parties can write content, thereby manipulating retrieval and generation. Blocking attacks do not aim for wrong answers but to make the system refuse benign queries, harming usability and user trust.
- Existing shortcomings: Existing methods use adversarial suffixes or explicit refusal instructions. The authors claim they weaken against newer aligned models, are easily detected by prompt injection filters, or require repeated queries to the target for feedback, making them difficult to transfer to unknown or multi-model systems.
- Observation: The authors claim that safety-aligned models overlap in risk categories and refusal standards, calling this alignment homogeneity. Query-related restricted risk contexts that induce refusal on an accessible model may trigger similar judgments on unknown targets.
- Method: Propose TabooRAG. In a surrogate RAG, optimize one document per query, balancing retrievability and refusal induction, then directly transfer to an unknown target; a strategy library reuses verified strategies based on query profiles.
- Threat Model
- Goal: Induce refusal on benign queries, not wrong or misleading content.
- Knowledge: Strict black-box. Cannot access target retriever R, generator G, or intermediate retrieval results.
- Capabilities: Knowledge base is partially open; only one document can be injected per query, cannot modify existing documents, and cannot repeatedly probe the target. Can use a target-independent surrogate model for optimization.
- Victim System: Open-domain RAG. Retriever takes top-k by Score(q, d). Success requires the document to be retrieved and generation to fall into the refusal set.
What related research exists?
Related work is divided into misleading attacks, blocking attacks, and over-refusal; the authors distinguish their work by actively constructing risky contexts.
Misleading attacks
- PoisonedRAG (Zou et al., 2025): splits adversarial documents into retrieval and generation parts, considering white-box and black-box on the retrieval side; injects five documents per query. The authors state that in practice attacks are usually under black-box constraints.
- AuthChain (Chang et al., 2025): constructs evidence chains and authority signals within a single document to achieve single-document misleading attacks. Zhang et al. (2025) is cited alongside the introduction and early misleading attacks.
Blocking attacks
- Jamming Attack (Shafran et al., 2025): uses hill climbing to construct adversarial suffixes to maximize refusal probability. The authors state that the suffixes have high perplexity, overfit specific models and contexts, and require frequent access to the target for feedback.
- MutedRAG (Suo et al., 2025) and WDoS (Liang et al., 2025, SafeRAG): the former replaces the generation part with explicit malicious instructions; the latter puts refusal instructions into query-relevant safety warnings. The authors state that such explicit suffixes or instructions are easy to detect, and that MutedRAG degrades on the latest aligned models in their experiments.
Over-refusal and alignment
- OR-Bench (Cui et al., 2025), XSTest (Röttger et al., 2024), COVER (Sullutrone et al., 2025): evaluate over-refusal on predefined sensitive content. COVER shows that external contexts containing sensitive fragments can cause models to refuse benign intentions.
- Constitutional AI (Bai et al., 2022), Safe RLHF (Dai et al., 2024), as well as Llama Guard (Inan et al., 2023) and a safety evaluation survey (Liu et al., 2025): used by the authors to support the overlap of mainstream models on common refusal categories.
Baselines and data
- Comparison baselines are PoisonedRAG, a refusal variant of AuthChain, and Jamming Attack, MutedRAG, WDoS. Datasets are NQ, MS-MARCO, and HotpotQA from BEIR, with 200 randomly sampled queries each.
The authors move over-refusal from passive evaluation to actively constructing constrained risky contexts, and state that alignment homogeneity provides a transferable blocking surface for unknown models.
How does the paper address this problem?
TabooRAG optimizes a single document with dual objectives in a proxy RAG, then transfers it to an unknown target.
After optimizing a blocking document in a target-independent surrogate RAG, verifying that it is retrievable and can induce refusal, it is directly injected into the unknown target. The framework is named TabooRAG. Attack success is written as dblock ∈ R(q, K′; k) ∧ G(q, Dblock) ∈ Yrefusal, i.e., the document enters top-k and the generation belongs to the refusal set.
Surrogate Environment
- Default attacker and judge LLM are GPT-5.2, surrogate LLM is DeepSeek-V3.2, surrogate retriever is text-embedding-3-small, top-k̃=5. Attacker and surrogate temperatures are both 0.1.
- At most two rounds of optimization, each with 20 iterations. Ranking threshold τ=3, strategy retrieval count n=10. These parameters only constrain the surrogate environment and need not equal the target top-k.
- Appendix A gives a single-query, single-round algorithm outline. Full generation prompts are in Appendix M, examples in Appendix L.
Stage 1: Competing Context and Strategy Retrieval
- The attacker LLM generates competing context for the query: pseudo-gold documents provide seemingly direct evidence, not necessarily truthful; distractor documents are relevant but lack direct evidence. The number of both types is m=⌊k̃/2⌋.
- The query is distilled into a profile containing Topic, Intent, Keywords. The strategy library stores strategies that have induced refusal on the surrogate LLM, indexed by historical profile embeddings.
- For a new query, up to n heuristic strategies are retrieved by profile similarity. Heuristics are not mandatory; the attacker LLM can reuse or create new strategies. The library is initially empty and only written to when surrogate refusal succeeds.
Stage 2: Dual-Objective Iteration
- Each round's input is the query, competing context, heuristic strategies, and failure history. The attacker LLM first decides to reuse or explore, then generates candidate documents.
- Three high-level preferences are Physical Harm, Social Bias, Compliance Risk, used to shift risk perspectives rather than fix a single trigger class. The mechanism is to place query-relevant content into a restricted risk scenario while semantically maintaining retrievability; specific prompt constraints are not repeated here.
- Candidates must satisfy both ranking and refusal. Ranking uses embedding cosine similarity: the number of competing documents scoring higher than the candidate must be less than τ. If ranking fails, surrogate generation is skipped.
- After passing ranking, the competing context and candidate are sent together to the surrogate LLM. The judge LLM performs binary classification: explicit refusal or stating inability to answer, without giving a direct or substantive answer to the original query, counts as refusal.
Termination and Transfer
- Failure history includes names of failed strategies, and the last two candidate documents with failure feedback, returned in natural language to avoid repetition.
- Stop when both objectives are met or the iteration limit is reached. Successful strategies and profiles are stored in the library, and the final document is injected into the target knowledge base without using target feedback.
What experiments did the paper conduct?
The authors state that after filtering, ASR is highest across all 27 settings, with a mean of 62.1%; without filtering, WDoS is higher on eight targets on HotpotQA.
Experimental setup
- Target LLMs: Llama-3-8B-Instruct, Ministral-3-8B-Instruct-2512, Gemma-3-12B-it, Qwen3-32B, Qwen3.5-9B, Qwen3.5-35B-A3B, DeepSeek-V3.2, DeepSeek-V4-Pro, GPT-5.2.
- Data and retrieval: 200 queries each from NQ, MS-MARCO, and HotpotQA. Target side uses Contriever, k=5. In Appendix E.2, GPT-5.2 labels 508 of 600 queries (84.7%) as far from risk.
- Baselines: PoisonedRAG keeps five documents per query; AuthChain, Jamming Attack, MutedRAG, and WDoS use one document. The misleading objectives of the first two are replaced with the same safety refusal objective as Jamming.
- Metrics: ASR is the proportion of queries that were originally answerable but are refused or abstained after the attack, excluding queries that were already unanswerable without the attack. ASRPG is the ASR after newly uploaded documents are first screened by Prompt-Guard-86M and flagged documents are not added to the corpus; the original corpus is not screened.
- Evaluation and repetition: Refusals are judged by GPT-5.2. Appendix I checks 17,300 judgments from the main experiments, with overall FP 0.80% and FN 0.39%. Each attack is run five times, and the mean is reported.
- Default roles: The attacker and judge are GPT-5.2, and the proxy is DeepSeek-V3.2. Therefore, when the target is also DeepSeek-V3.2, documents are optimized on that model itself.
Main results
The table below shows TabooRAG's ASRPG from Table 1.
Swipe horizontally to read the table
Target model NQ MS-MARCO HotpotQA Llama-3-8B-Instruct 60.5% 52.9% 60.4% Ministral-3-8B-Instruct-2512 66.1% 49.7% 50.5% Gemma-3-12B-it 62.0% 52.6% 63.5% Qwen3-32B 62.3% 45.2% 56.5% Qwen3.5-35B-A3B 67.0% 64.1% 69.2% DeepSeek-V3.2 80.7% 63.8% 75.3% DeepSeek-V4-Pro 60.0% 58.9% 51.5% GPT-5.2 73.1% 67.8% 76.0% - Qwen3.5-9B is omitted; its ASRPG is 62.8% on NQ, 55.7% on MS-MARCO, and 68.9% on HotpotQA. The lowest cell in the table is Qwen3-32B's 45.2% on MS-MARCO. The DeepSeek-V3.2 row has the same target as the default proxy.
- The authors state that TabooRAG has the highest ASRPG across all 27 combinations; the mean is 62.1%, the mean of the strongest baseline in each combination is 37.1%, and the relative gain is 67.3%. Unfiltered ASR is highest in 17 of the 27 settings.
- The exception is on HotpotQA: WDoS has the highest unfiltered ASR on eight of the nine targets, e.g., 99.0% for Ministral-3-8B and 87.7% for GPT-5.2; the corresponding ASRPG values are 5.9% and 0.0%. On GPT-5.2, TabooRAG's unfiltered ASR is 94.5%, higher than WDoS in that cell.
Cross-model transfer
- Table 2 uses NQ with GPT-5.2 as the attacker, optimizing separately for nine proxies, then transferring to nine targets. Diagonal cells have the same proxy and target.
- The Llama-3-8B proxy transferred to GPT-5.2 has an ASR of 83.3%. The default proxy DeepSeek-V3.2 transferred to GPT-5.2 is 76.3%, the same as in Table 1. When the proxy and target are both GPT-5.2, it is 90.7%. There are also lower cells, such as the Gemma-3-12B proxy transferred to DeepSeek-V4-Pro at 42.3%.
- The authors state that documents optimized only on 8B-class proxies still achieve high ASR on unseen targets, and consider this consistent with alignment homogeneity. Appendix D reports that same-instance overlap is higher than a permutation null distribution that preserves each model's ASR, with mean Cohen's κ of 0.249 and p < 10^{-4}.
Retrieval, pipeline, and templates
- Table 3 uses GPT-5.2 as the target: TabooRAG's top-5 recall is 82.41%, 70.59%, and 100.00% on NQ, MS-MARCO, and HotpotQA, with ASR of 76.3%, 68.5%, and 94.5%. The authors state that the gap between recall and ASR is smaller than for all baselines on each dataset.
- Table 4 is still NQ with GPT-5.2. Default dense retrieval has ASR 76.3% and recall 82.4%; Dense plus Qwen3-Reranker gives 89.8% and 98.1%; Hybrid plus BGE-Reranker gives 75.9% and 80.6%. The authors state that these variants cannot reliably exclude blocking documents.
- After adding all gold documents to the context in Appendix G, the GPT column in Table 20 is 77.8%. As target top-k goes from 1 to 10, the authors state that recall rises monotonically with k and ASR generally rises; Figure 15 does not give endpoint numbers in the main text. After replacing the template, TabooRAG's GPT column in Table 21 is 77.8%, while Jamming's GPT column is 9.3% with the general template and 3.7% with the safety template.
Defenses
- Table 8 targets GPT-5.2. Unfiltered ASR is 76.3% on NQ, 68.5% on MS-MARCO, and 94.5% on HotpotQA. Query rewriting is 43.8% on MS-MARCO and 95.4% on HotpotQA. The fake news classifier is 53.7% on NQ and 67.3% on MS-MARCO.
- The authors state that no tested defense consistently lowers ASR across all three datasets. Runtime filtering may remove benign evidence while leaving blocking documents, making post-defense ASR higher than no defense in some cases, such as Prompt-Guard at 76.9% on NQ. Here, Prompt-Guard screens all retrieved passages, which differs from the pre-ingestion ASRPG in Table 1.
- Figure 5 uses GPT-2 to compute PPL. The authors state that Jamming and MutedRAG have high PPL and are easy to separate, while TabooRAG's distribution overlaps with clean documents; the main text does not give quantile values.
Other ablations and analysis
- Strategy library (Figure 3, NQ): single-round OSR goes from 64.5% to 90.5%, and two-round from 73.5% to 98.0%; without the library, GPT-5.2's ASR in the two-round setting goes from 76.3% to 46.3%; average iterations go from 18.8 to 7.3, which the authors state is about 61%.
- Fixed library (Figure 4, NQ/GPT-5.2): ASR without the library is 46.3%, with 20 fixed strategies it is 74.1%, and with continuous updates it is 76.3%. The main text does not map 5 and 10 strategies to the remaining numbers in the figure one by one.
- Warm start (Table 5): a read-only library built by GPT-5.2 on HotpotQA is used for five weaker attackers on NQ; ASR rises by 8.3 to 13.9 percentage points, e.g., Gemma-3-12B from 45.4% to 59.3%. Documents are then transferred to GPT-5.2 for evaluation.
- Prompt components (Table 7, NQ/GPT-5.2, MNLI screening): the full prompt has a pass rate of 96.3% and ASR of 75.0%; removing all details gives 14.8% and 11.1%.
- Query order (Table 6, NQ): the authors state that default, shuffled, and reversed orders all cause fluctuations, and that eight of the nine targets are higher than the corresponding strongest baseline from Table 1 in each order.
- Cost (Table 9, rounded): TabooRAG averages 9 calls and 17,241 tokens per query; Jamming uses 3,913 calls and 3,529,464 tokens; MutedRAG and WDoS use 0.
What are some points that can be further explored?
The authors limit the scope to English open-domain text QA, and list multilingual, multimodal, and domain-specific scenarios as future work.
Limitations and Future Directions Noted by the Authors
- The study focuses on text, open-domain English QA, and the third-party content injection setting in the threat model (Appendix K).
- Evaluation includes multiple datasets, model families, retrieval pipelines, prompt templates, and several defenses; the authors also note that the broader RAG ecosystem includes multilingual, multimodal, and domain-specific applications (Appendix K).
- The authors list extending analysis to these settings and building a broader RAG usability benchmark as future directions (Appendix K).
Experimental Coverage
- Main experiments use nine target LLMs, datasets NQ, MS-MARCO, HotpotQA, each with 200 queries, averaged over five attacks per query (Section 5.1, Table 1).
- Default attacker is GPT-5.2, surrogate is DeepSeek-V3.2; Table 2 uses nine surrogates for NQ transfer. Appendix H repeats some transfer, strategy library, and surrogate retriever experiments with Qwen3-32B as attacker.
- Defense evaluation includes PPL, query rewriting, Prompt-Guard-86M, context-query consistency, two-stage refusal verification, MNLI plausibility, and DistilBERT fake news classifier; Table 8 targets GPT-5.2 (Section 6).
- Stronger target pipelines include BM25 hybrid retrieval, BGE-Reranker-V2-M3, and Qwen3-Reranker-0.6B (Table 4, Appendix G.1). Appendix G also reports gold documents all in context, target top-k from 1 to 10, and two replacement templates.
- The paper states an iteration budget of at most two rounds, each with 20 iterations, τ=3, n=10, and reports call counts and tokens in Table 9. Appendix I gives FP and FN for judge and human.
Summarize the main content of the paper
TabooRAG blocks RAG via agent-side risk document migration; the authors report a mean ASR of 62.1% after filtering.
TabooRAG is a transferable blocking attack against RAG usability, without modifying existing documents or reading target feedback.
- Problem: Third parties can inject content into open knowledge bases. The authors aim to make benign queries refused, while existing suffixes or explicit instructions either rely on target feedback or fail after filtering.
- Approach: The attacker LLM generates one document per query in a surrogate RAG, optimizing with both ranking and refusal filters, and stores verified strategies from query profiles into the library. After surrogate verification, a single document is directly transferred to an unknown system.
- Main Results: Default surrogate is DeepSeek-V3.2. The authors claim that across nine LLMs and three datasets, after Prompt-Guard library screening, ASR is highest across all 27 settings, with a mean of 62.1%, a gain of 67.3% over the mean of the strongest baseline per setting at 37.1%.
- Transfer and Exceptions: On NQ, Llama-3-8B surrogate documents transferred to GPT-5.2 achieve ASR of 83.3% (Table 2). Without filtering, on HotpotQA, WDoS is higher on eight targets, but after filtering it is lower than TabooRAG (Table 1).
- Authors' Conclusion: The authors argue that shared risk categories and refusal standards make safety alignment a usability vulnerability in RAG, and accordingly propose the need for RAG-specific defenses and alignment strategies that reduce false refusals while preserving intended safety behavior.