AIDEFEND in Action AIA-0161 Validated Research

NVIDIA NemoClaw: A Web Page Reaches Local Ollama and Rewrites the Model's Chat Template

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.

Model PoisoningLocal Agent TakeoverAI Deployment SecurityAI InfrastructureAgentic AI
8 applicable AIDEFEND defenses
Source: Drive-By Agent Hijacking: One Website Visit, Persistent Model Poisoning 
Authors: Elad Luz, Ofek Itach (Cyera Research)
Original article: Aug 25, 2026

Threat Analysis

  • What NemoClaw set up. OpenClaw runs in an OpenShell sandbox, a Docker container, and can use a model served by Ollama on the developer's machine. A container cannot reach Ollama's default 127.0.0.1 listener, so NemoClaw started it with OLLAMA_HOST=0.0.0.0:11434, while the installer printed "Using Ollama on localhost:11434". Ollama's API has no authentication. It keeps web pages out with an origin check and a Host header check, and skips the Host check when bound to a non-loopback address.
  • How a page gets in. The attacker serves a page from their own domain on port 11434, then changes the domain's DNS answer to 127.0.0.1. The browser treats the unchanged host name as the same origin. For illustration, a page loaded from http://rebind.attacker.example:11434/ keeps calling http://rebind.attacker.example:11434/api/tags; after the DNS change the request reaches local Ollama, whose origin check sees matching Origin and Host values and answers.
  • What the page changed. In the demonstration the page read the Ollama version, installed models, hostname and public key, then used /api/create to rewrite one model's chat template, the Go template that turns messages into the text the model receives. A hidden system field would be overridden by OpenClaw's own system prompt; the template applies to every message. The same prompt then returned the injected marker. The change persists, and the model's name, size and metadata look unchanged.
  • A second route needs no browser. The researchers state that any device on the same network segment can call the API directly. NVIDIA's CVE-2026-65105 describes that exposure: missing authentication on the inference service of NemoClaw for Linux, reachable from an adjacent network (CVSS 3.1 score 8.1). NVIDIA's text names information disclosure and denial of service, not DNS rebinding or template changes.
  • What is not established. No source reports use against a real user, and the CISA entry on the CVE record lists exploitation as none as of 2026-08-26. The follow-on agent behaviors the researchers list, such as planted code flaws or data sent out, were not demonstrated. NVIDIA credits Markus Halvorsen and Elad Luz of Oasis Security with the finding.
  • What the repair leaves open. NVIDIA's fixing commit, dated 2026-03-23, binds Ollama to 127.0.0.1 behind a proxy on port 11435 that requires a per-installation token. That first proxy answered GET /api/tags without a token and forwarded any other path once the token matched; current documentation says every endpoint requires it. The documented Windows-host route from WSL has no proxy and relies on Ollama staying on 127.0.0.1.

Applicable AIDEFEND Defenses (8)

AID-H-003.010
Deployed AI Software Vulnerability Remediation Lifecycle
Very High
Update NemoClaw on every Linux host to a build containing NVIDIA's repair (commit f06796ff3) and run onboarding again, so Ollama restarts on 127.0.0.1:11434 behind the token-checked proxy on port 11435. A rebound page is then refused by Ollama's Host check on 11434 and gets 401 on 11435, as does a device on the network. Confirm from the running state, not the version label: the bulletin shows 0.0.25 as both affected and updated.
AID-H-038.001
Inference Runtime Listener & Protocol Conformance
Very High
The installer printed "Using Ollama on localhost:11434" while the socket was open on every interface. Once Ollama is ready, read the sockets its process owns, compare them with an approved profile (11434 on 127.0.0.1 only, the proxy on its declared port), and stop the start on any wider bind. Ollama then stays on loopback with its Host check active, so neither route finds an unauthenticated listener. Repeat after every restart, upgrade or OLLAMA_HOST change.
AID-H-004.002
Service & API Authentication
High
Ollama has no authentication, so the path the sandbox uses to reach it must supply one. Put a gateway in front that checks a per-installation key on every route, read-only ones such as /api/tags and /api/show included, and keep the key outside the sandbox; NemoClaw now has the OpenShell proxy add it at egress. A web page has no key and stops at 401. This holds only while no unauthenticated listener remains beside the gateway.
AID-H-038.002
Inference Runtime Privileged Operation Authorization
High
An agent that only needs inference should not hold a credential that can also rewrite models. Ollama has no operation-level gate, so filter at the gateway: forward only inference routes for the sandbox's key and refuse /api/create, /api/copy, /api/pull, /api/push and /api/delete outside a separate operator path, so a caller who reaches the API still cannot replace the template. NVIDIA's first proxy forwards any path once the token matches; the deploying team adds this filter, and it counts only while Ollama stays on loopback.
AID-D-004.001
Static Artifact Integrity Re-verification & Drift Monitoring
Medium
The rewrite leaves the model's name, size and metadata unchanged, so using the model reveals nothing. What changes is what Ollama stores for it. Record an approved file list and digests for each local model the agent uses, then have a separate read-only job re-hash a snapshot of the Ollama model directory on a schedule and report changed, missing or unexpected files. This finds the rewrite afterwards; it does not block /api/create.
AID-E-003.003
Confirmed Malicious Code & Persistence Eviction
Medium
Once a rewritten template is confirmed, treat it as a persistence object. Close the listener first, or it can be rewritten again. Keep the changed model files as evidence, restore the approved template from a trusted copy, and have a second person confirm that /api/show returns it and that a test prompt no longer shows the added text. This ends the hidden instruction for later sessions; what the agent produced meanwhile still needs review.
AID-M-001.006
Internal AI Endpoint & Agent-Service Discovery
Medium
Scan the developer and lab subnets you are authorized to scan for hosts that answer GET /api/version on port 11434 without credentials. Because the installer said "localhost", their users may not know the port is open, and some hosts will not be registered as running NemoClaw. Reconcile every hit to an owner and send it to the update and listener checks. The scan only reports exposure, and only what is reachable from where it runs.
AID-I-002.001
Internal AI Network Segmentation
Partial
Until a host is updated, a host firewall rule can limit port 11434 to the Docker network the sandbox uses and drop every other source. That stops another device on the segment from calling the API directly, the route NVIDIA's adjacent-network score describes. It closes that route only: the web route arrives from the developer's own browser over loopback, where no network rule sees the traffic.

What Defenders Should Do Now

  • Find exposed hosts. List machines running NemoClaw with Ollama and scan authorized subnets for hosts answering GET /api/version on port 11434 without credentials. On each host, read the real listeners (for example ss -ltnp | grep 11434). Pass: 11434 appears only on 127.0.0.1, whatever the installer message said.
  • Update, then confirm by behavior. Move to a NemoClaw build containing commit f06796ff3 and run onboarding again. The bulletin shows 0.0.25 as both affected and updated, and NVD marks versions up to and including 0.0.25 as vulnerable. Without the token, port 11434 should not connect from another machine or a container, and port 11435, including GET /api/tags, should return 401.
  • Test every other route the same way. For a Windows-host Ollama used from WSL, a hand-built proxy or another local runtime, the backend should answer only on loopback and return 403 to an unfamiliar Host value, and every route a container can reach should need a credential the browser lacks.
  • Separate model management from inference. With the sandbox's key, POST /api/create with a template field should be refused, and /api/show should return the same template afterwards.
  • Check existing templates. Record the approved template and file digests for each local model and compare them on a schedule with /api/show and the Ollama model directory. If one changed without approval, close the listener, keep the changed model as evidence, restore the template from a trusted copy, confirm with a test prompt, and review what the agent produced meanwhile.
  • Use the firewall only as a stopgap. Until a host is updated, restrict port 11434 to the Docker network the sandbox uses. That closes the same-network route; the browser route stays open until Ollama is back on loopback.

1 additional consideration

Resolver and browser protections against DNS rebinding

The web route depends on a public domain name being answered with a loopback or private address, and on a public page being allowed to call a local address.
Recommendation: On managed developer machines, the team that runs DNS and browser policy can have the resolver drop answers that map public names to loopback or private ranges, and can turn on the managed browser's restrictions on public pages calling local-network addresses where the browser offers them. Test with a harmless rebinding domain the team controls. This narrows the browser route only: it does nothing about a device already on the same network, and a laptop on an unmanaged network may not use the filtering resolver.

Conclusion

One unauthenticated service was bound to every interface so a container could reach it, and that removed the check that kept web pages away from the model server. AIDEFEND  maps the case to four places: repair and listener verification that keep Ollama on loopback, authentication on the path the sandbox uses, a route allowlist that keeps model management away from inference callers, and integrity checks and eviction for the chat template itself.

Last updated: