{
  "post": {
    "title": "Backdoored model weights: what to check before an agent runs on a model you host",
    "url": "https://bardak.ai/posts/model-weight-backdoors",
    "updated": "2026-11-28T07:00:00.000Z"
  },
  "citation": "Backdoored model weights: what to check before an agent runs on a model you host, Ivan Bardak, bardak.ai, https://bardak.ai/posts/model-weight-backdoors",
  "datasets": [
    {
      "key": "two-november-2026-reports",
      "title": "Two November 2026 reports",
      "type": "benchmarkTable",
      "source": "NEAR AI (9 November 2026); Microsoft Research (10 November 2026); Zeng et al. (arXiv 2611.15118, 11 November 2026). Read 23 November 2026",
      "caption": "One is a demonstrated capability in a lab, the other a real intrusion described by the affected company. Neither is prompt injection.",
      "csv": "https://bardak.ai/data/model-weight-backdoors/two-november-2026-reports.csv",
      "header": [
        "Date",
        "What happened",
        "What the attacker needed",
        "What it got past",
        "Source"
      ],
      "rows": [
        [
          "9 November 2026",
          "An attacker exploited a code execution flaw in SGLang on one of NEAR AI's inference servers and moved into its wider infrastructure",
          "An exploitable remote code execution flaw in SGLang; NEAR names no CVE, version or entry point",
          "Confidential computing, which protects data from the operator and host but not from flawed software inside",
          "NEAR AI incident report (self-reported)"
        ],
        [
          "10 November 2026",
          "Microsoft researchers changed 7 of more than 12,000 neurons in one layer of an open 8B model so that it emits an attacker's command in a coding agent's actions when a trigger appears",
          "Write access to the model file before deployment; no training, no access to the victim's agent",
          "Ordinary evaluation: no payload on benign tasks, and near-normal benchmark scores for the edited model they scored",
          "Microsoft Research blog (10 November 2026); Lazarus preprint, arXiv 2611.15118 (11 November 2026, not peer reviewed)"
        ]
      ]
    },
    {
      "key": "qwen3-6-27b-before-and-after-the-backdoor-edit",
      "title": "Qwen3.6-27B before and after the backdoor edit",
      "type": "chart",
      "source": "Zeng et al., Lazare, veni foras (arXiv 2611.15118 v1), Table 3",
      "caption": "Edited with the observation trigger; prompts without the trigger. Terminal-Bench is 41 against 37 of 88 tasks. With the other trigger type, AIME 2025 fell to 57.50%. Only Qwen was scored on capability, and the paper reports no safety benchmark.",
      "csv": "https://bardak.ai/data/model-weight-backdoors/qwen3-6-27b-before-and-after-the-backdoor-edit.csv",
      "header": [
        "Benchmark",
        "Clean model",
        "Edited model"
      ],
      "rows": [
        [
          "Terminal-Bench 2.1 (pass@1)",
          "46.59",
          "42.05"
        ],
        [
          "AIME 2025 (pass@1)",
          "61.67",
          "60.42"
        ],
        [
          "AIME 2026 (pass@1)",
          "65.83",
          "65.83"
        ]
      ]
    },
    {
      "key": "where-model-weights-can-be-changed-on-the-way-to-an-agent",
      "title": "Where model weights can be changed on the way to an agent",
      "type": "knowledgeGraph",
      "source": "Zeng et al. (arXiv 2611.15118); NEAR AI; NVD; Mithril Security",
      "caption": "Every arrow into the inference server is a place where the weights an agent runs on can be swapped or edited. The agent's tools decide what a triggered backdoor can do.",
      "csv": "https://bardak.ai/data/model-weight-backdoors/where-model-weights-can-be-changed-on-the-way-to-an-agent.csv",
      "header": [
        "source",
        "target",
        "relation"
      ],
      "rows": [
        [
          "Publisher",
          "Model hub",
          "uploads a release"
        ],
        [
          "Model hub",
          "Private registry",
          "download pinned to a commit"
        ],
        [
          "Fine-tuning job",
          "Checkpoint store",
          "writes new weights"
        ],
        [
          "Private registry",
          "Inference server",
          "loads the model"
        ],
        [
          "Checkpoint store",
          "Inference server",
          "loads the model"
        ],
        [
          "Inference server",
          "Agent",
          "serves completions"
        ],
        [
          "Agent",
          "Tools",
          "calls"
        ],
        [
          "Attacker",
          "Model hub",
          "lookalike upload (PoisonGPT)"
        ],
        [
          "Attacker",
          "Checkpoint store",
          "write access (Lazarus threat model)"
        ],
        [
          "Attacker",
          "Inference server",
          "admin endpoint loads an adapter (CVE-2026-127222)"
        ],
        [
          "Attacker",
          "Inference server",
          "code execution (NEAR AI)"
        ]
      ]
    },
    {
      "key": "controls-for-self-hosted-model-weights",
      "title": "Controls for self-hosted model weights",
      "type": "benchmarkTable",
      "source": "OpenSSF Model Signing specification; OWASP Top 10 for LLM Applications 2026 (LLM04, LLM05); CERT/CC; NEAR AI; Zeng et al.; NIST AI 100-2 E2025",
      "caption": "No single row is enough. The first five keep the wrong weights out; the last limits what happens when they get in anyway.",
      "csv": "https://bardak.ai/data/model-weight-backdoors/controls-for-self-hosted-model-weights.csv",
      "header": [
        "Control",
        "What it stops",
        "What it does not stop",
        "Where it lives"
      ],
      "rows": [
        [
          "Pin the model to a full commit hash and mirror it into a private registry",
          "A hub branch or tag moving to new files after you reviewed it; pipelines that pull the latest version",
          "A malicious release you pinned; a backdoor the publisher shipped",
          "Download step, deployment configuration"
        ],
        [
          "Sign every file of the model and verify before loading (OpenSSF Model Signing)",
          "Any change after signing, including chat templates and tokenizers; extra files added to the folder",
          "A backdoor present when it was signed; a build pipeline that signs its own tampered output",
          "Publisher's release; your promotion gate"
        ],
        [
          "Load safetensors only; review templates, tokenizers and adapters like code",
          "Code that runs on load; template payloads like CVE-2026-5760",
          "An edit to the weights themselves",
          "Model intake review"
        ],
        [
          "Control write access to checkpoints, fine-tunes and adapters like production code",
          "The Lazarus threat model: someone editing weights between publisher and server",
          "An insider with legitimate access who is not reviewed",
          "Storage permissions, change review, logs"
        ],
        [
          "Patch the inference server and its manager; require API and admin keys; keep it off untrusted networks",
          "Known flaws; unauthenticated weight updates, adapter loading and weight theft",
          "Flaws with no fix yet; a leaked key",
          "Platform team, launch flags, network policy"
        ],
        [
          "Limit egress and secrets on inference hosts; keep keys out of logs",
          "Pivoting from the server into other systems; keys harvested from logs",
          "Data being processed on the compromised server",
          "Host and network policy, logging"
        ],
        [
          "Confidential computing with attestation",
          "The cloud operator or host reading prompts and weights",
          "A flaw in the software inside the enclave",
          "Hardware and platform"
        ],
        [
          "Behavioural evaluation and trigger probing",
          "Obvious misbehaviour",
          "Backdoors that leave benchmark scores intact; it never proves a model is clean",
          "Model selection, after every fine-tune"
        ],
        [
          "Limit what the agent can do: allow-listed tools, a policy gate outside the model, approval for consequential actions",
          "The damage a triggered backdoor or hijacked model can cause",
          "The trigger itself; data the model can already see",
          "Agent runtime, tool gateway"
        ]
      ]
    },
    {
      "key": "appraising-the-evidence",
      "title": "Appraising the evidence",
      "type": "benchmarkTable",
      "source": "",
      "caption": "",
      "csv": "https://bardak.ai/data/model-weight-backdoors/appraising-the-evidence.csv",
      "header": [
        "Evidence",
        "Who produced it",
        "Strength",
        "Main limitation"
      ],
      "rows": [
        [
          "Lazarus paper and blog",
          "Five Microsoft researchers",
          "A careful lab demonstration on three public models",
          "Preprint; harmless payload; teacher-forced measurements; code not public; Microsoft sells model hosting and security"
        ],
        [
          "NEAR AI incident report",
          "The affected company",
          "A real intrusion",
          "Self-reported; no CVE, version, timeline or indicators"
        ],
        [
          "CERT/CC notes, NVD records, SGLang source",
          "Independent coordinator, CVE authorities, my reading of the code",
          "Strong for what each flaw allows",
          "Scores set by the reporting authority; 28 of 43 records not analysed by NVD (26 deferred)"
        ],
        [
          "CISA KEV entry for GPUStack",
          "US government catalogue",
          "Strong evidence of exploitation",
          "Says nothing about flaws not listed"
        ],
        [
          "JFrog, ReversingLabs, Oligo",
          "Security vendors",
          "Primary research on real files and attacks",
          "Vendors selling the products that address the problem"
        ],
        [
          "OpenSSF, OWASP, NIST",
          "Standards bodies",
          "Authoritative on controls",
          "Describe what to do, not how well it works"
        ]
      ]
    }
  ]
}