Skip to content
IAM Insights

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

share
9,678 words. With Sizhe Chen, author, Meta FAIR; UC Berkeley; Arman Zharmagambetov, author, Meta FAIR; David Wagner, author, UC Berkeley; Chuan Guo, author, Meta FAIR.
01

What's happening

Finding4
BI-FIND-2025-0355Lead finding

In 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.

high confidencebest source: vendor, technicalobserved Jul 2025EvidenceSection 2Ablations, conclusion and stated limits
flag a problem with BI-FIND-2025-0355
BI-FIND-2025-0357

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.

high confidencebest source: vendor, technicalobserved Jul 2025EvidenceSection 3Section 2
flag a problem with BI-FIND-2025-0357
BI-FIND-2025-0358

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".

high confidencebest source: vendor, technicalobserved Jul 2025EvidenceSection 4
flag a problem with BI-FIND-2025-0358
BI-FIND-2025-0356

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.

medium confidencebest source: vendor, technicalobserved Jul 2025EvidenceSection 1Ablations, conclusion and stated limits
flag a problem with BI-FIND-2025-0356
02

Section by section

5

showing 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

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

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

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

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

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

Terms used

AgentDojo
A benchmark environment for testing whether a large language model (LLM) agent completes its task while resisting prompt-injection attacks in tool outputs and external content.
Gemini 2.5 Flash
Google model.
Attack success rate
The share of attack attempts in a test that achieve the attacker's goal.
Meta SecAlign
Meta's open-weight language model with 70 billion parameters, trained with SecAlign, a defence against prompt injection.
LLM
The text-predicting AI model behind chatbots and agents. It follows instructions statistically, which is why an instruction hidden in its input can redirect it.
Jailbreak
A prompt or technique that gets an AI model to bypass its safety safeguards; a 'universal' jailbreak works broadly across topics, a narrow one only in specific circumstances.
Direct prompt injection
Prompt injection where the attacker edits the instruction the user gives the agent, rather than text the agent later reads from a tool or document.
AlpacaEval 2
A benchmark in which a GPT-4-based judge compares a model's answers with a reference model's answers.

Cited in our columns

Read next

Was this briefing useful?

Share this briefing

Every finding, forecast and open question on this site has a permanent ID. If we reword one, its ID stays the same, so a citation keeps pointing to the same claim.

Follow us on LinkedInRSS feed

Working on an identity problem this research touches? Talk to Boston Identity