A Malicious Webpage Could Poison Your Local AI Model Behind NVIDIA NemoClaw
Oasis Security disclosed a critical vulnerability in NVIDIA NemoClaw allowing malicious webpages to take unauthenticated control of local Ollama instances and inject hidden instructions into AI models The attack exploits Ollama being bound to 0.0.0.0:11434 on Windows/WSL paths, combined with DNS rebinding to bypass browser-origin request protections Attackers can modify the model's chat template via /api/create to append attacker-controlled text to every system message at inference time, persist
Analysis
TL;DR
- Oasis Security disclosed a critical vulnerability in NVIDIA NemoClaw allowing malicious webpages to take unauthenticated control of local Ollama instances and inject hidden instructions into AI models
- The attack exploits Ollama being bound to 0.0.0.0:11434 on Windows/WSL paths, combined with DNS rebinding to bypass browser-origin request protections
- Attackers can modify the model's chat template via /api/create to append attacker-controlled text to every system message at inference time, persisting across conversations
- The vulnerability was fixed for macOS and Linux in NemoClaw v0.0.35, but remains unfixed on Windows and WSL paths as of August 25, 2026
- NemoClaw v0.0.106 introduced a bind-check proxy that refuses non-loopback Ollama backends, but this protection does not apply to the affected Windows-host configuration path
Why It Matters
This vulnerability demonstrates how local AI agent deployments can be compromised through seemingly isolated browser interactions, undermining the security assumptions of sandboxed AI agent architectures. It highlights a critical gap between NVIDIA's security documentation (which warns against LAN/internet exposure) and the actual attack surface (browser-based DNS rebinding requires no network exposure). For AI practitioners running local agents with Ollama, this represents a direct path to model poisoning that bypasses traditional perimeter security controls.
Technical Details
- Attack Vector: NemoClaw starts Ollama with
OLLAMA_HOST=0.0.0.0:11434on Windows/WSL paths, binding the inference server to all network interfaces without authentication on port 11434 - Bypass Mechanism: The API relies on Host header checks and CORS middleware to block browser-originated requests, but when bound to non-loopback addresses, Ollama skips Host header validation entirely; DNS rebinding allows an attacker's domain to resolve first to their server, then to 127.0.0.1 while the browser treats requests as same-origin
- Model Poisoning Method: The payload writes a modified Go template through Ollama's
/api/createendpoint; this template controls how structured messages are rendered into raw text before inference, appending attacker-controlled text to every system message - Persistence: Poisoned instructions survive across conversations and override agent-supplied system prompts, as the template is a model-level property invisible to API consumers with no integrity checks in NemoClaw
- Platform Disparity: Non-WSL hosts correctly keep Ollama on 127.0.0.1:11434 behind a token-gated reverse proxy on 0.0.0.0:11435, while Docker Desktop on WSL skips the proxy entirely due to
host.docker.internalresolution
Industry Insight
- AI agent frameworks must treat local inference backends as trust boundaries requiring the same authentication rigor as remote services; binding to 0.0.0.0 without authentication should be considered a critical misconfiguration regardless of sandboxing claims
- The pattern of "security through documentation" (warning users not to expose ports) is insufficient when the architecture itself creates attack surfaces accessible to browser-based threats; implement defense-in-depth with mandatory loopback binding and Host/Origin header validation
- Model template integrity verification should become a standard requirement in AI agent stacks, as poisoned chat templates represent a persistent, undetectable (to clients) backdoor that survives reboots and conversation resets
Disclaimer: The above content is generated by AI and is for reference only.