Red Teaming a Composed RAG-Agent LLM Application: Measuring Prompt Injection, Secret Leakage and Tool Abuse, and the Effect of Defenses

Prompt-level instructions failed as a security control on every attack surface of a composed LLM application, while server-side controls drove all secret-leakage paths to 0%. We built Acme Assistant, a deliberately vulnerable internal helpdesk application that combines a credential-bearing system prompt, a Retrieval-Augmented Generation (RAG) layer and a tool-calling agent, served by a small local model (qwen2.5:3b). We attacked it with NVIDIA Garak for single-turn coverage, Microsoft PyRIT for multi-turn Crescendo and Tree of Attacks with Pruning (TAP), and a custom canary-based detector for planted secrets. Single-turn attacks succeeded at high rates: direct prompt injection in 95% of attempts, a DAN persona jailbreak in 100%, and indirect injection through a poisoned RAG document in 75%. Off-the-shelf detectors scored the indirect injection only as goal deviation; our target-specific detector showed that 25% of those responses also leaked real administrative credentials. TAP succeeded on all four multi-turn objectives, including arbitrary host file read through an over-privileged tool. We map eight findings to the OWASP Top 10 for LLM Applications (2025) and MITRE ATLAS, then measure four server-side defenses: forced-string injection fell from 90% to 0% and every secret-leakage path fell to 0%, while a generic injection trigger persisted at 45%.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-04
DOI
https://doi.org/10.5281/zenodo.23953154
Primary Topic
Adversarial Robustness in Machine Learning
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Red Teaming a Composed RAG-Agent LLM Application: Measuring Prompt Injection, Secret Leakage and Tool Abuse, and the Effect of Defenses

Mohamed Aymen Ladhari
Zenodo (CERN European Organization for Nuclear Research)
Adversarial Robustness in Machine Learning
preprint

Red Teaming a Composed RAG-Agent LLM Application: Measuring Prompt Injection, Secret Leakage and Tool Abuse, and the Effect of Defenses

Mohamed Aymen Ladhari
preprint en

Abstract

Prompt-level instructions failed as a security control on every attack surface of a composed LLM application, while server-side controls drove all secret-leakage paths to 0%. We built Acme Assistant, a deliberately vulnerable internal helpdesk application that combines a credential-bearing system prompt, a Retrieval-Augmented Generation (RAG) layer and a tool-calling agent, served by a small local model (qwen2.5:3b). We attacked it with NVIDIA Garak for single-turn coverage, Microsoft PyRIT for multi-turn Crescendo and Tree of Attacks with Pruning (TAP), and a custom canary-based detector for planted secrets. Single-turn attacks succeeded at high rates: direct prompt injection in 95% of attempts, a DAN persona jailbreak in 100%, and indirect injection through a poisoned RAG document in 75%. Off-the-shelf detectors scored the indirect injection only as goal deviation; our target-specific detector showed that 25% of those responses also leaked real administrative credentials. TAP succeeded on all four multi-turn objectives, including arbitrary host file read through an over-privileged tool. We map eight findings to the OWASP Top 10 for LLM Applications (2025) and MITRE ATLAS, then measure four server-side defenses: forced-string injection fell from 90% to 0% and every secret-leakage path fell to 0%, while a generic injection trigger persisted at 45%.

Zenodo (CERN European Organization for Nuclear Research)
Adversarial Robustness in Machine Learning
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
Red Teaming a Composed RAG-Agent LLM Application: Measuring Prompt Injection, Secret Leakage and Tool Abuse, and the Effect of Defenses — Mohamed Aymen Ladhari · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS