{
  "schema": "aidefend-secureflow-metadata-v1",
  "flow_id": "aidefend-research-sf0111-nemoclaw-dns-rebinding-ollama-chat-template-poisoning",
  "title": "NVIDIA NemoClaw: A Web Page Reaches Local Ollama and Rewrites the Model's Chat Template",
  "subtitle": "NemoClaw started Ollama on every network interface, which switched off the check that keeps web pages away from the local model API. Researchers used the opening to append hidden text to every system message the agent sends.",
  "summary": "NVIDIA NemoClaw runs the OpenClaw AI agent in an OpenShell sandbox and can serve its model through Ollama, a local model runtime whose API has no authentication. Cyera Research showed that NemoClaw bound Ollama to every network interface, which makes Ollama skip its Host header check. A web page could then use DNS rebinding (re-pointing its own domain to 127.0.0.1) to call the API from the developer's browser and rewrite a model's chat template, which builds the text the model receives, so attacker text was appended to every system message the agent sent. NVIDIA tracks the unauthenticated access as CVE-2026-65105 and has released a repair. No real-world use is reported.",
  "reviewed": true,
  "import_status": "curated-research",
  "ai_layers": [
    "ai-infrastructure",
    "autonomous-agents"
  ],
  "risk_impact": [
    "model-poisoning-integrity",
    "data-exfiltration",
    "service-disruption-dos"
  ],
  "affected_components": [
    "NemoClaw local-inference setup (Ollama on port 11434)",
    "Ollama model-management API",
    "Model chat template",
    "OpenClaw agent in the OpenShell sandbox"
  ],
  "source_research": {
    "provider": "Cyera Research",
    "primary_url": "https://www.cyera.com/research/nemoclaw-one-website-visit-to-hijack-your-ai-agent",
    "published": "2026-08-25",
    "note": "Cyera Research demonstrated the web route in its own environment. The same-network route is stated by the researchers and matches NVIDIA's adjacent-network score. The follow-on agent behavior the article lists was not demonstrated."
  },
  "attack_steps": [
    {
      "id": "open-attacker-page",
      "title": "The developer opens the attacker's page on port 11434",
      "zhTitle": "開發者開啟攻擊者架在 11434 連接埠的網頁",
      "summary": "The attacker's domain first resolves to the attacker's own server. The developer's browser loads a page from that domain on port 11434, the port the local Ollama API also uses.",
      "zhSummary": "攻擊者的網域一開始解析到攻擊者自己的伺服器。開發者的瀏覽器從這個網域的 11434 連接埠載入網頁，而本機的 Ollama API 用的也是同一個連接埠。",
      "tactic": "AML.TA0004",
      "technique": "AML.T0078",
      "layout": {
        "x": 0,
        "y": 0
      }
    },
    {
      "id": "rebind-to-ollama",
      "title": "DNS rebinding sends the page's requests to the local Ollama API",
      "zhTitle": "攻擊者透過 DNS 重新綁定，把網頁的請求改送到本機的 Ollama API",
      "summary": "The attacker's DNS then answers 127.0.0.1 (or the machine's LAN address) for the same domain. The page's JavaScript keeps calling the same host and port, so the browser now sends those requests to local Ollama. Because NemoClaw bound Ollama to 0.0.0.0, Ollama skips its Host header check, and its origin check accepts the request as same-origin. The page has full, unauthenticated API access.",
      "zhSummary": "攻擊者的 DNS 接著把同一個網域改解析到 127.0.0.1（或這台機器的區域網路位址）。網頁裡的 JavaScript 照樣呼叫同一個主機名稱與連接埠，瀏覽器就把這些請求送到本機的 Ollama。由於 NemoClaw 把 Ollama 綁在 0.0.0.0，Ollama 不檢查 Host 標頭，來源檢查也把請求當成同源請求放行，網頁因此不必通過任何驗證，就能使用完整的 API。",
      "tactic": "AML.TA0015",
      "technique": "AML.T0122",
      "layout": {
        "x": 610,
        "y": 0
      }
    },
    {
      "id": "lan-direct-call",
      "title": "A device on the same network segment calls the API directly",
      "zhTitle": "同網段的其他裝置直接呼叫同一組 API",
      "summary": "The researchers state that the same binding exposes port 11434 to the local network, so another device on the segment can call the API with no DNS rebinding. NVIDIA scores the flaw as reachable from an adjacent network. The demonstration does not show this route.",
      "zhSummary": "研究人員指出，同樣的綁定方式也讓 11434 連接埠對整個區域網路開放，同網段的其他裝置不必使用 DNS 重新綁定，就能直接呼叫 API。NVIDIA 為這個漏洞評分時，也把攻擊來源定為相鄰網路。示範並沒有實際展示這條路徑。",
      "tactic": "AML.TA0004",
      "technique": "AML.T0132",
      "layout": {
        "x": 610,
        "y": 650
      }
    },
    {
      "id": "enumerate-runtime",
      "title": "Read runtime details and the model's existing chat template",
      "zhTitle": "讀取 Ollama 的版本與模型清單，並取得原本的對話範本",
      "summary": "In the demonstration the page reads the Ollama version, the installed models, and the machine's hostname and public key. The researchers describe fetching the target model's existing template through /api/show so the injected text can be spliced in without breaking tool formatting.",
      "zhSummary": "在示範中，網頁讀出 Ollama 的版本、已安裝的模型，以及這台機器的主機名稱與公開金鑰。研究人員說明，攻擊者會先用 /api/show 取得目標模型原本的對話範本，再把要注入的文字接進去，這樣原有的工具呼叫格式才不會被破壞。",
      "tactic": "AML.TA0008",
      "technique": "AML.T0007",
      "layout": {
        "x": 1220,
        "y": 0
      }
    },
    {
      "id": "rewrite-chat-template",
      "title": "Rewrite the model's chat template through /api/create",
      "zhTitle": "透過 /api/create 改寫模型的對話範本",
      "summary": "The page calls /api/create with a template field. The new Go template keeps the original role and tool formatting and appends attacker text to every system message. The model's name, size and metadata look unchanged.",
      "zhSummary": "網頁呼叫 /api/create，並在請求裡帶上 template 欄位。新的 Go 範本保留原本的角色與工具格式，只在每一則系統提示詞後面多接一段攻擊者的文字。模型的名稱、大小與中繼資料（metadata）看起來都沒有變。",
      "tactic": "AML.TA0006",
      "technique": "AML.T0018.003",
      "layout": {
        "x": 1830,
        "y": 0
      }
    },
    {
      "id": "agent-renders-template",
      "title": "Every later agent request carries the hidden instruction",
      "zhTitle": "之後 agent 的每一次請求都帶著隱藏指令",
      "summary": "Ollama applies the template at inference time to all messages, including the system prompt OpenClaw sends. In the demonstration the same prompt, sent again from the sandbox, returned a reply containing the injected marker. The rewritten template persists across later conversations.",
      "zhSummary": "Ollama 在推論時會用這份範本處理所有訊息，OpenClaw 自己送出的系統提示詞也不例外。在示範中，研究人員回到沙箱再送一次相同的提示詞，agent 的回覆就多了被注入的標記。改寫後的範本會一直留著，之後的每一次對話都受影響。",
      "tactic": "AML.TA0005",
      "technique": "AML.T0051.002",
      "layout": {
        "x": 2440,
        "y": 0
      }
    }
  ],
  "threat_refs": [
    {
      "id": "AML.T0078",
      "name": "Drive-by Compromise"
    },
    {
      "id": "AML.T0122",
      "name": "Exploitation of Remote Services"
    },
    {
      "id": "AML.T0132",
      "name": "Misconfigured or Publicly Exposed AI Services"
    },
    {
      "id": "AML.T0007",
      "name": "Discover AI Artifacts"
    },
    {
      "id": "AML.T0018.003",
      "name": "Modify Prompt Construction Logic"
    },
    {
      "id": "AML.T0051.002",
      "name": "Triggered"
    }
  ],
  "reader_narrative": {
    "pathCount": 2,
    "topologyNote": "Two entry routes reach the same unauthenticated Ollama API. They are alternatives, not steps that must both succeed. The researchers demonstrated the web route end to end, and the later steps are shown only through that route.",
    "groups": [
      {
        "id": "web-route",
        "kind": "path",
        "eyebrow": "Demonstrated route",
        "label": "Web page and DNS rebinding",
        "summary": "The proof of concept reaches the local API from the developer's own browser.",
        "stepIds": [
          "open-attacker-page",
          "rebind-to-ollama"
        ]
      },
      {
        "id": "lan-route",
        "kind": "path",
        "eyebrow": "Stated route",
        "label": "Same network segment",
        "summary": "The researchers state this route and NVIDIA scores the flaw as adjacent-network. The demonstration does not show it.",
        "stepIds": [
          "lan-direct-call"
        ]
      },
      {
        "id": "takeover",
        "kind": "shared",
        "eyebrow": "After API access",
        "label": "Enumeration, template rewrite and effect on the agent",
        "summary": "Shown through the web route. Either route reaches the same unauthenticated API.",
        "stepIds": [
          "enumerate-runtime",
          "rewrite-chat-template",
          "agent-renders-template"
        ]
      }
    ]
  }
}
