Seedlabs
Source research

Hidden-in-Plain-Text: A Benchmark for Social-Web Indirect Prompt Injection in RAG

Haoze Guo, Ziqi Wei · 2026 · 14 citationsRead the paper

Retrieval-augmented generation (RAG) systems put more and more emphasis on grounding their responses in user-generated content found on the Web, amplifying both their usefulness and their attack surface. Most notably, indirect prompt injection and retrieval poisoning attack the web-native carriers that survive ingestion pipelines and are very concerning. We provide OpenRAG-Soc, a compact, reproducible benchmark-and-harness for web-facing RAG evaluation under these threats, in a discrete data package. The suite combines a social corpus with interchangeable sparse and dense retrievers and deployable mitigations - HTML/Markdown sanitization, Unicode normalization, and attribution-gated answered. It standardizes end-to-end evaluation from ingestion to generation and reports attacks time of one of the responses at answer time, rank shifts in both sparse and dense retrievers, utility and latency, allowing for apples-to-apples comparisons across carriers and defenses. OpenRAG-Soc targets practitioners who need fast, and realistic tests to track risk and harden deployments.

What the full text shows

Working prototype
  • Combined defenses (Sanitization, Normalization, and Attribution-gating) consistently achieve the lowest Attack Success Rate (ASR) with negligible utility cost. (Across all carriers, sparse and dense retrievers, and tested LLMs (Llama-3, Mistral, Qwen2.5))
  • Sanitization and Normalization preserved ranking quality on clean sets with minimal degradation in MRR and nDCG. — ΔMRR@10: -0.012; ΔnDCG@10: -0.009 (Clean set k=10)
  • Attribution-gating achieved high token-level citation alignment. — 0.88 (Attribution-gated runs)
  • Specific defenses target different failure modes: Attribution-gating for visible imperatives, Normalization for confusables, and a combination for query alignment. — ↓ASR 78% (Attr.), ↓ASR 66% (Norm.), ↓ASR 61% (San.+Attr.) (Categorized by failure mode (Visible imperatives, Confusables, Query alignment))
  • Ingestion sanitization and Unicode normalization introduce minimal latency overhead. — Sanitization: +31ms (median) / +154ms (p95); Normalization: < 0.5% pipeline latency (End-to-end pipeline)
  • The ASR detector demonstrated high precision and recall during human audit. — P=0.92, R=0.89, F1=0.90 (N=1200 generations)
Setup
Corpus of 6,200 social-style pages across 5 carriers (hidden spans, off-screen CSS, alt text, ARIA, zero-width). Tested with sparse (BM25) and dense retrievers (E5-base, BGE-large, Contriever) and LLMs (Llama-3-8B/70B, Mistral-7B, Qwen2.5-14B).
How
The researchers developed OpenRAG-Soc, a benchmark harness that tests a RAG pipeline (ingest → retrieve → generate) against indirect prompt injections and retrieval poisoning. They evaluated the effectiveness of three deployable mitigations: HTML/Markdown sanitization, Unicode normalization, and attribution-gated answering.
Limitations
Prompts were fixed per run; fully prompt-aware adaptive adversaries were not tested. · Does not cover JS-rendered DOM transforms, custom renderers, or OCR noise.

Summarized by Gemma 4 from the open-access full text · 12 Nov 2026. Read it