Briefing · Paper · source · updated · Boston Identity
Meta's injection-trained Llama kept agent attacks to 2.1% or less, but its authors tried no attack tuned against it
Researchers at Meta FAIR and UC Berkeley released Meta-SecAlign-70B, a Llama 3.3 model fine-tuned to ignore instructions hidden in untrusted data that the application puts in a new chat role. In their own tests it was harder to inject than GPT-4o or the Gemini Flash models on AgentDojo and lost little utility. None of the attacks they ran was tuned against the model, and they suspect such attacks would succeed substantially more often.
What changed: Regraded: the findings on Meta SecAlign's utility cost and on more capable Llama 3 models being mostly easier to inject are now high confidence, not medium, because both read figures from the authors' tables.
arXiv · Sizhe Chen, Arman Zharmagambetov, David Wagner, Chuan Guo · July 3, 2025 · read
What's happening
Finding4In the authors' runs, Meta-SecAlign-70B cut attack success on three agent benchmarks to 2.1% or less, with no attack tuned against the model.
In the authors' own runs, Meta-SecAlign-70B cut attack success on three agent benchmarks compared with the undefended Llama-3.3-70B: from 14.1% to 2.1% on AgentDojo, from 53.8% to 0.5% on InjecAgent, and from 2.4% to 0% end to end on WASP. On AgentDojo that is below every closed model they tested, which ranged from 11.3% (Gemini 2.0 Flash) to 27.9% (Gemini 2.5 Flash), and the model saw no agent tasks in training. Every attack was optimization-free, meaning none was tuned against the model, and the authors "suspect optimization-based attacks can achieve substantially higher ASRs on Meta SecAlign." On InjecAgent and AgentDojo every model also got a reminder of the user's task after the data.
flag a problem with BI-FIND-2025-0355
In the authors' setup, Meta SecAlign lost 1.7 points of SEP utility on its defended route, against 5.8 to 25.8 for the closed models they tested.
Measured as the score lost when data goes through the defended route, security cost Meta SecAlign little: AlpacaEval2 rose 0.5 points and SEP utility fell 1.7. GPT-4o-mini, GPT-4o and the two Gemini Flash models lost 5.8 to 25.8 points of SEP utility, and Gemini 2.5 Flash's AlpacaEval2 score fell from 69.0% to 44.6%. The comparison rests on the authors' setup: the closed models' defences accept untrusted data only as tool output, so the authors fed it through a dummy tool, which they say itself lowers utility. On general knowledge Meta SecAlign still trails Gemini 2.5 Flash, 67.6% to 80.9% on MMLU-Pro, by the leaderboard figures the authors cite.
The more capable undefended Llama 3 models were mostly easier to inject, and after SecAlign++ training each was at 7.3% or below in the authors' table.
Across three Llama 3 models, the more capable undefended ones were mostly easier to inject: attack success on SEP's end-position attack was 50.4% for Llama-3.1-8B, 79.2% for Llama-3.1-70B and 88.4% for Llama-3.3-70B, and on CyberSecEval2 21.8%, 36.4% and 52.7%. After SecAlign++ training each was at 7.3% or below on every attack in the authors' table. The authors see in this trend "hope" that more capable frontier models can still be defended, while noting the recipe "has only been tested in the Llama 3 series".
flag a problem with BI-FIND-2025-0358
Meta SecAlign protects only the text an application puts in its new input role, and the authors scope it to indirect injection.
Meta SecAlign protects only the text an application puts in its new input role, which the authors built to hold external data "with potential injected instructions that the LLM should ignore." Any text can go there, where OpenAI's and Google's defences take untrusted data only as a tool response; without the role, the authors expect the model to behave as if undefended. The system and user roles stay fully trusted. The authors scope it to indirect injection: it does not prevent jailbreaks, direct prompt injection or data extraction. They say system-level defenses may add to it; the one they combine it with, a "sandwich" reminder of the task after the data, "almost uniformly boosted utility and reduced ASR for all models." We read the role as a label on where text arrived; an agent still needs its own authorization checks on what it may do.
flag a problem with BI-FIND-2025-0356
Section by section
5showing 5 of 5
[1]Threat model and the SecAlign++ training recipe
Sizhe Chen, Meta FAIR; UC Berkeley · Arman Zharmagambetov, Meta FAIR · David Wagner, UC Berkeley · Chuan Guo, Meta FAIR
AI trust
Threat model and the SecAlign++ training recipe
Sizhe Chen, Meta FAIR; UC Berkeley · Arman Zharmagambetov, Meta FAIR · David Wagner, UC Berkeley · Chuan Guo, Meta FAIR
Meta FAIR and UC Berkeley authors release Meta-SecAlign-8B and -70B, Llama 3 models fine-tuned with preference optimization on 19,157 generic samples to ignore instructions in a new input role for untrusted data. Their threat model trusts the user, the system prompt and the provider, and treats only the environment as hostile. Compared with SecAlign, the recipe randomizes where injections sit and trains on the model's own answers. The weights carry a non-commercial research licence.
technical artifactfrom published text + figures
[2]Benchmark results against closed-source defended models
Sizhe Chen, Meta FAIR; UC Berkeley · Arman Zharmagambetov, Meta FAIR · David Wagner, UC Berkeley · Chuan Guo, Meta FAIR
AI trust
Benchmark results against closed-source defended models
Sizhe Chen, Meta FAIR; UC Berkeley · Arman Zharmagambetov, Meta FAIR · David Wagner, UC Berkeley · Chuan Guo, Meta FAIR
The authors ran Meta-SecAlign-70B, the undefended Llama-3.3-70B, GPT-4o-mini, GPT-4o and Gemini 2.0 and 2.5 Flash themselves, with optimization-free attacks. Attack success fell from 14.1% to 2.1% on AgentDojo, from 53.8% to 0.5% on InjecAgent and from 2.4% to 0% end to end on WASP. Knowledge scores slipped about 2 points on IFEval and GPQA, and AgentDojo utility rose from 56.7% to 77.3%. On InjecAgent and AgentDojo every model got a reminder of the task after the data.
technical artifactfrom published text + figures
[3]Utility cost of injection security and the LoRA alpha dial
Sizhe Chen, Meta FAIR; UC Berkeley · Arman Zharmagambetov, Meta FAIR · David Wagner, UC Berkeley · Chuan Guo, Meta FAIR
AI trust
Utility cost of injection security and the LoRA alpha dial
Sizhe Chen, Meta FAIR; UC Berkeley · Arman Zharmagambetov, Meta FAIR · David Wagner, UC Berkeley · Chuan Guo, Meta FAIR
The utility cost of prompt injection security, in the authors' terms, is the score a model loses when data goes through the defended role. Meta SecAlign gains 0.5 points on AlpacaEval2 and loses 1.7 on SEP. The closed models, fed data through a dummy tool, lose 5.8 to 25.8 points on SEP. A LoRA setting turned at test time trades security for utility, and the authors find getting attack success below 5% "fairly easy".
technical artifactfrom published text + figures
[4]Stronger models are more vulnerable but can be steered
Sizhe Chen, Meta FAIR; UC Berkeley · Arman Zharmagambetov, Meta FAIR · David Wagner, UC Berkeley · Chuan Guo, Meta FAIR
AI trust
Stronger models are more vulnerable but can be steered
Sizhe Chen, Meta FAIR; UC Berkeley · Arman Zharmagambetov, Meta FAIR · David Wagner, UC Berkeley · Chuan Guo, Meta FAIR
Before training, attack success mostly climbs with capability across Llama-3.1-8B, Llama-3.1-70B and Llama-3.3-70B: 50.4%, 79.2% and 88.4% on SEP's end-position attack. After SecAlign++ all three sit at 7.3% or below on every attack in the table. The authors read this as hope that more capable models can still be defended, though they test only Llama 3.
technical artifactfrom published text + figures
[5]Ablations, conclusion and stated limits
Sizhe Chen, Meta FAIR; UC Berkeley · Arman Zharmagambetov, Meta FAIR · David Wagner, UC Berkeley · Chuan Guo, Meta FAIR
AI trust
Ablations, conclusion and stated limits
Sizhe Chen, Meta FAIR; UC Berkeley · Arman Zharmagambetov, Meta FAIR · David Wagner, UC Berkeley · Chuan Guo, Meta FAIR
Both recipe changes are needed to keep utility: with self-generated responses and random injection positions AgentDojo utility is 77.3%, against 6.2% to 15.5% with one or neither. Training on Natural-Instructions, which has longer data, leaves SEP attack success at 66.8%. The authors limit their claims to indirect injection, Llama 3 and optimization-free attacks, and suspect optimized attacks would score substantially higher.
technical artifactfrom published text + figures