Pith. sign in

REVIEW 37 cited by

StruQ: Defending Against Prompt Injection with Structured Queries

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2402.06363 v2 pith:QHOLJPVL submitted 2024-02-09 cs.CR

classification cs.CR
keywords promptstructuredattacksdatainstructionsqueriesfollowinjection
verification ladder T0 review T1 audit T2 compute T3 formal

Signed reviews

No signed human review yet.

0 comments
read the original abstract

Recent advances in Large Language Models (LLMs) enable exciting LLM-integrated applications, which perform text-based tasks by utilizing their advanced language understanding capabilities. However, as LLMs have improved, so have the attacks against them. Prompt injection attacks are an important threat: they trick the model into deviating from the original application's instructions and instead follow user directives. These attacks rely on the LLM's ability to follow instructions and inability to separate prompts and user data. We introduce structured queries, a general approach to tackle this problem. Structured queries separate prompts and data into two channels. We implement a system that supports structured queries. This system is made of (1) a secure front-end that formats a prompt and user data into a special format, and (2) a specially trained LLM that can produce high-quality outputs from these inputs. The LLM is trained using a novel fine-tuning strategy: we convert a base (non-instruction-tuned) LLM to a structured instruction-tuned model that will only follow instructions in the prompt portion of a query. To do so, we augment standard instruction tuning datasets with examples that also include instructions in the data portion of the query, and fine-tune the model to ignore these. Our system significantly improves resistance to prompt injection attacks, with little or no impact on utility. Our code is released at https://github.com/Sizhe-Chen/StruQ.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 37 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Prismata: Confining Cross-Site Prompt Injection in Web Agents

    cs.CR 2026-07 conditional novelty 7.5 of 10

    Prismata cuts web-agent prompt-injection attack success from 85.5% to 0.7% via Biba-inspired DOM trust labeling and mechanical least-privilege confinement without site annotations.

  2. DualView: Preventing Indirect Prompt Injection in Personal AI Agents

    cs.CR 2026-07 conditional novelty 7.0 of 10

    DualView extends Dual-LLM symbol isolation into the shared user environment via dual Agent/Human views, blocking both immediate and stored IPI at 0% ASR while preserving near-baseline utility.

  3. Transferable Direct Prompt Injection via Activation-Guided MCMC Sampling

    cs.AI 2025-09 conditional novelty 7.0 of 10

    An activation-guided energy model plus MCMC sampling creates transferable direct prompt injection attacks in a black-box setting, reaching 49.6% average attack success across five LLMs.

  4. Fun-tuning: Characterizing the Vulnerability of Proprietary LLMs to Optimization-based Prompt Injection Attacks via the Fine-Tuning Interface

    cs.CR 2025-01 conditional novelty 7.0 of 10

    Attackers can use the loss signal from a remote LLM fine-tuning API to optimize adversarial prefix and suffix tokens, turning existing prompt injections into high-success attacks on closed-weight Gemini models.

  5. Feedback-Guided Extraction of Knowledge Base from Retrieval-Augmented LLM Applications

    cs.CR 2024-11 conditional novelty 7.0 of 10

    An agent-based black-box attack, CopyBreakRAG, progressively extracts over 70% of chunks from RAG knowledge bases by alternating curiosity-driven exploration with reasoning-based exploitation.

  6. Beyond Handcrafted Security: Towards Self-Evolving Defense for LLM Agents

    cs.CR 2026-08 conditional novelty 6.0 of 10

    A self-evolving runtime defense for LLM agents, HARD, improves security over static handcrafted defenses by updating context policies and action gates from failure traces.

  7. ContainmentBench: Trace-Based Evaluation of Post-Injection Containment in Tool-Using LLM Agents

    cs.CR 2026-07 accept novelty 6.0 of 10

    Terminal policy labels are insufficient: two containment policies with identical zero-harm endpoints still differ in 73.5% of trajectories and in authorized-work completion.

  8. Data Leakage Prevention in Agentic Applications via Preemptive Hardening

    cs.CR 2026-07 conditional novelty 6.0 of 10

    A build-time pipeline that scans, patches, and validates agentic LLM apps reduced prompt-injection leakage to 0% on most tested apps and by 91% on the hardest stress case.

  9. ChannelGuard: Safe Models Do Not Compose into Safe Multi-Agent Systems

    cs.CR 2026-07 conditional novelty 6.0 of 10

    An undefended multi-agent pipeline's apparent perfect attack-safety is mostly the cloud provider's hidden filter, silently re-sourcing to model alignment on other backends; embedding gates restore deterministic applic...

  10. NetInjectBench: Benchmarking Indirect Prompt Injection in Tool-Using Large Language Model Agents for Network Operations

    cs.CR 2026-07 conditional novelty 6.0 of 10

    A metadata-aware policy gate yields 0/240 unsafe attack tool actions under metadata integrity while preserving approved high-impact changes, outperforming prompt defenses and static allowlists on NetInjectBench.

  11. Token-Flow Firewall: Semantic Runtime Auditing for Persistent AI Agents

    cs.CR 2026-07 conditional novelty 6.0 of 10

    TokenWall mediates persistent-agent security by auditing source–sink token flows with a local small model and selective large-model escalation, cutting CIK-Bench attack success to 12.5% at low benign latency.

  12. Measuring the Security of Mobile LLM Agents under Adversarial Prompts from Untrusted Third-Party Channels

    cs.CR 2025-10 conditional novelty 6.0 of 10

    Indirect prompt injection through ads, webviews, and notifications reliably diverts mobile LLM agents into leaking data and installing malware across eight evaluated agents.

  13. SoK: Systematizing LLM Prompt Security: Taxonomies, Datasets, and Unified Evaluation of Attacks and Defenses

    cs.CR 2025-10 conditional novelty 6.0 of 10

    A systemization of LLM jailbreak security that adds linked taxonomies, an evaluation platform, and JailbreakDB, while its main attack–defense comparison results remain deferred.

  14. Defending Against Prompt Injection With a Few DefensiveTokens

    cs.CR 2025-07 conditional novelty 6.0 of 10

    Five optimized token embeddings prepended to the prompt reduce prompt-injection attack success to near zero on standard benchmarks while preserving most model utility.

  15. Context manipulation attacks : Web agents are susceptible to corrupted memory

    cs.CR 2025-06 conditional novelty 6.0 of 10

    Web agents with protected prompts can still be hijacked by injecting malicious steps into their stored task plans, reaching up to 63% success on privacy leaks.

  16. Invisible Prompts, Visible Threats: Malicious Font Injection in External Resources for Large Language Models

    cs.CR 2025-05 conditional novelty 6.0 of 10

    Maliciously crafted fonts can hide adversarial prompts from human eyes while LLMs read and obey them, enabling content manipulation and data exfiltration via MCP tools.

  17. Adversarial Suffix Filtering: a Defense Pipeline for LLMs

    cs.LG 2025-05 conditional novelty 6.0 of 10

    ASF detects and removes adversarial suffixes by segmenting prompts and classifying each segment with a fine-tuned BERT model, reducing jailbreak success on several LLMs while leaving normal-task performance roughly intact.

  18. AgentVigil: Generic Black-Box Red-teaming for Indirect Prompt Injection against LLM Agents

    cs.CR 2025-05 conditional novelty 6.0 of 10

    AgentVigil uses Monte Carlo Tree Search and coverage-guided scoring to automatically craft indirect prompt injection attacks that succeed 71% and 70% of the time on two agent benchmarks, about double the baseline.

  19. The Illusion of Role Separation: Hidden Shortcuts in LLM Role Learning (and How to Fix Them)

    cs.CL 2025-05 conditional novelty 6.0 of 10

    Fine-tuned LLMs separate roles via task-type and begin-of-text shortcuts; PFT, which inserts a gap into position IDs during fine-tuning, reduces those shortcuts and improves closed-domain attack robustness.

  20. MELON: Provable Defense Against Indirect Prompt Injection Attacks in AI Agents

    cs.CR 2025-02 conditional novelty 6.0 of 10

    MELON detects indirect prompt injection in LLM agents by re-executing each step with the user prompt replaced by a neutral task prompt and flagging attacks when the original and masked runs produce similar tool calls.

  21. The Task Shield: Enforcing Task Alignment to Defend Against Indirect Prompt Injection in LLM Agents

    cs.CR 2024-12 conditional novelty 6.0 of 10

    Task Shield cuts indirect prompt injection attack success to 2.07% on AgentDojo with GPT-4o by using an LLM to verify that each instruction and tool call contributes to the user's explicit goals.

  22. Towards Action Hijacking of Large Language Model-based Agent

    cs.CR 2024-12 conditional novelty 6.0 of 10

    A RAG-based LLM application can be induced to assemble harmful SQL, code, or medical action plans from knowledge already stored in its database, with the user prompt itself carrying no forbidden words.

  23. No Free Lunch for Defending Against Prefilling Attack by In-Context Learning

    cs.CR 2024-12 conditional novelty 6.0 of 10

    Adversative in-context examples ('Sure... However...') defend many LLMs against prefilling jailbreaks but cause over-refusal, so the defense trades safety for helpfulness.

  24. LeakAgent: RL-based Red-teaming Agent for LLM Privacy Leakage

    cs.CR 2024-12 conditional novelty 6.0 of 10

    An RL-trained prompt generator outperforms rule-based and fuzzing baselines at extracting system prompts and training data from black-box LLMs.

  25. Rethinking Penetration Testing for AI-Enabled Systems: From Resource Compromise to Behavioral Objective Violation

    cs.CR 2026-07 conditional novelty 5.0 of 10

    AI-enabled penetration is redefined as the feasible induction of AI-governed behavior that violates an operational objective, with a workflow for testing it.

  26. Isolating LLM Alignment from Regex: Zero Coverage and Metric-Dependent Divergence Under Adversarial Mutation

    cs.AI 2026-06 conditional novelty 5.0 of 10

    Under a substring classifier, Gemini-2.5-flash with the regex removed blocks 0% of 45 adversarial probes; under an LLM judge, it blocks 56–100% of PAIR variants.

  27. A Real-Time, Self-Tuning Moderator Framework for Adversarial Prompt Detection

    cs.CR 2025-08 conditional novelty 5.0 of 10

    RTST, a two-agent moderator with an explainable Behavior ledger and per-prompt weight updates, reduced attack success rate from 12-63% to 0-17% on three jailbreak benchmarks with Gemini 2.5 Flash.

  28. PromptArmor: Simple yet Effective Prompt Injection Defenses

    cs.CR 2025-07 conditional novelty 5.0 of 10

    PromptArmor prompts a separate LLM to detect and remove injected prompts from agent inputs, achieving below 1% false positive and false negative rates on AgentDojo.

  29. Detection Method for Prompt Injection by Integrating Pre-trained Model and Heuristic Feature Engineering

    cs.CL 2025-06 conditional novelty 5.0 of 10

    A dual-channel detector combining DeBERTa and heuristic rules is claimed to beat existing prompt injection detectors on three benchmarks and to reduce attack success on GLM-4, Llama 3, Qwen 2.5, and GPT-4o.

  30. PromptShield: Deployable Detection for Prompt Injection Attacks

    cs.CR 2025-01 conditional novelty 5.0 of 10

    PromptShield reports a 65.3% true positive rate at 0.1% false positive rate for prompt injection detection, more than six times the best prior model, on its own out-of-distribution evaluation split.

  31. Divide and Conquer: A Hybrid Strategy Defeats Multimodal Large Language Models

    cs.CL 2024-12 conditional novelty 5.0 of 10

    JMLLM, a hybrid obfuscation framework, raises jailbreak success rates across text, image, and speech inputs of multimodal LLMs while using fewer queries than prior methods.

  32. Quantifying Conversation Drift in MCP via Latent Polytope

    cs.CL 2025-08 reject novelty 4.0 of 10

    SecMCP flags MCP conversation drift by thresholding per-layer activation distances from benign anchors, reporting AUROC above 0.915 on Llama3, Vicuna, and Mistral.

  33. A Survey on Autonomy-Induced Security Risks in Large Model-Based Agents

    cs.AI 2025-06 conditional novelty 4.0 of 10

    The paper surveys security risks of LLM agents, organizes them into a five-level autonomy taxonomy, and proposes an untested CMDP-based architecture called R2A2.

  34. From LLMs to MLLMs to Agents: A Survey of Emerging Paradigms in Jailbreak Attacks and Defenses within LLM Ecosystem

    cs.CR 2025-06 conditional novelty 4.0 of 10

    A structured survey of recent jailbreak attacks and defenses across LLMs, multimodal LLMs, and agents, with taxonomies for methods, datasets, metrics, and defenses.

  35. Design Patterns for Securing LLM Agents against Prompt Injections

    cs.LG 2025-06 conditional novelty 4.0 of 10

    Six composable design patterns (action-selector, plan-then-execute, map-reduce, dual LLM, code-then-execute, context-minimization) constrain LLM agents so prompt-injected text cannot reach consequential actions.

  36. Navigating the Risks: A Survey of Security, Privacy, and Ethics Threats in LLM-Based Agents

    cs.AI 2024-11 conditional novelty 4.0 of 10

    A survey proposing a source-and-impact taxonomy (input, model, combined; security, privacy, ethics) for threats to LLM-based agents, with feature analysis and four case studies.

  37. Attack and defense techniques in large language models: A survey and new perspectives

    cs.CR 2025-05 unverdicted novelty 1.0 of 10

    A survey taxonomizing LLM attacks into prompt, optimized, application-level, and model-theft categories, and defenses into prevention and detection categories, with no new empirical results.

Pith tools