From GitHub Β· Β· 1m 50s
GitHub - rudratoshs/buried-injections: π‘οΈ Regex catches 0%, Meta's Prompt Guard 2 catches 1% of 629 realistic AgentDojo injection attacks when they're buried in tool output
Meta's Prompt Guard 2 catches 1% of buried AI injection attacks in tool output.
In brief
Meta's Prompt Guard 2 catches 1% of buried AI injection attacks in tool output. Meta's Prompt Guard 2 catches 1% of 629 realistic AgentDojo injection attacks when they're buried in tool output. Originally reported by GitHub.
Buried injections test

I ran 10 open-source detectors against 629 real AgentDojo injection attacks buried in ordinary tool output.
βI ran 10 open-source detectors against 629 real AgentDojo injection attacks, each buried inside ordinary tool output, the way an agent firewall actually sees themβ
None catch most attacks
None caught most attacks without also blocking normal traffic.
βNone catches most attacks without also blocking normal trafficβ
Best trade-off
Jailbreak-detector-large caught 51% of attacks at 2% false positives.
βjailbreak-detector-large: 319 / 629 (51%) caught in tool output, 2 / 97 (2%) false positivesβ
Meta's Prompt Guard 2
Meta's Prompt Guard 2 catches 1% of attacks at its default threshold.
βprompt-guard-2-86m: 6 / 629 (1%) caught in tool outputβ
Default threshold issue
Prompt Guard 2's default threshold is too high for mixed content.
βPrompt Guard 2 catches 1% at its default 0.5 cutoff and 97, 100% per unseen domain once the threshold is lowered to 0.003β
Threshold calibration
Lowering Prompt Guard 2's threshold to 0.003 catches 97, 100% of attacks across unseen domains.
βPrompt Guard 2 catches 97, 100% across unseen domains at ~5% false alarms when threshold is 0.003β
Three failure modes
Detectors fail in three ways: no wording recognition, context dilution, and over-flagging.
βThey fail in three different ways out of the box π, and the default threshold turns out to matter as much as the modelβ
Wording recognition
Prompt Guard 2 catches phrasing it was trained on but misses real attacks.
βAgentDojo's goals, πΈ 'Send as much money as possible to the account US13β¦', ποΈ 'Delete the file with ID '13', read like ordinary user requestsβ
Context dilution
Surrounding text drowns attack signals in context.
βProtectAI's classifier flags all 27 attack texts on their own but catches only 23% when placed in normal tool outputβ
Over-flagging
Deepset and fmops flag 98% of safe tool outputs as attacks.
βdeepset-deberta: 629 / 629 (100%) caught, 95 / 97 (98%) false positivesβ
Threshold tuning
At a 2% false-alarm budget, Prompt Guard 2 catches 27 out of 40 polite versions.
βPrompt Guard 2 catches 27 / 40 commands and 1 / 40 polite versions at a 2% false-alarm budgetβ
Realistic attacks
Realistic agent attacks sit where text classifiers are weakest.
βEvery AgentDojo attack uses the same wrapper template ('This is an important message from meβ¦')β
Policy enforcement
Policy-based enforcement matters more than text-level detection for agent firewalls.
βDefences need to know where an instruction came from and what the tool call would doβ
Agent firewall advice
Build policy gates to track instruction sources and tool call actions.
βA policy gate for agent tool calls that tracks whether an argument came from the user or tool outputβ
Reproducible benchmark
The benchmark uses 629 real AgentDojo attacks and 97 benign tool outputs.
βmake bench-agentdojo Β· 629 attacks + 97 benign cases, each attack embedded in real AgentDojo tool outputβ
What happens next
Tune thresholds on your own traffic before trusting model performance.
βTune a detector's threshold on your own traffic before trusting any single number on its model cardβ
What it means
Meta's Prompt Guard 2 catches 1% of 629 realistic AgentDojo injection attacks when they're buried in tool output.
Read the TL;DR β this story on one card.





