> status: mostly fine. patch anyway.practical AI security · est. 2026

Brief · Builders

Is My Ollama Exposed? Check It and Lock It Down

By alkizz ·

Update, Nov 27, 2026: Exposed model servers can also just fall over. CVE-2026-137057 in llama.cpp's llama-server lets anyone who can reach it send one /completion request with a malformed grammar, a repetition such as {5,2} where the maximum is lower than the minimum, and the server keeps generating rules until it hangs and runs out of memory. No login is needed. It's a denial of service, not code execution. Per the NVD record, builds b7118 through b12603 are affected, and the fix is in b12604, released Nov 21. This is a llama.cpp bug, and the NVD record names llama-server, not Ollama. I haven't found an Ollama advisory for it, so I can't say whether Ollama's own builds are affected; check Ollama's release notes for a llama.cpp update. If you run llama-server, or an app that bundles its own copy of llama.cpp, update it, check which llama.cpp build the bundle actually ships, and keep it behind a login or off the network (item 8 and item 7 of the Builder's Checklist).

Update, Nov 19, 2026: Rapid7 looked at 7,675 Ollama servers answering without authentication in a Nov 10 snapshot and found models left by someone other than the owner on 54.8% of them, from "I was here" markers to pulls from raw IP addresses and free tunnels. I wrote up what it found and how to read your own model list. If the checks below show your server is reachable, look at /api/tags before you lock it down, because a stranger's model in that list means you should treat the server as compromised, not just misconfigured.

Ollama binds to 127.0.0.1:11434 by default, according to its FAQ, and its local API doesn't require authentication. Those two facts belong together. Change the bind address, publish a container port or add a tunnel and you can turn a local tool into somebody else's inference service.

I check the listener and then test from another machine. A setting that says localhost is useful, but a response arriving over the network is better evidence of what you've actually exposed.

Check what's listening

On Linux, run:

ss -ltnp | grep 11434

On macOS, run:

lsof -nP -iTCP:11434 -sTCP:LISTEN

On Windows, use PowerShell:

Get-NetTCPConnection -LocalPort 11434 -State Listen

Look at the local address, not just whether the process is running. 127.0.0.1 and ::1 are loopback. 0.0.0.0, :: or a LAN address means the listener isn't limited to loopback. That doesn't prove the internet can reach it, because routing and firewalls still matter, but it does mean you need to check the network boundary.

For Docker, also inspect the published ports:

docker ps --format 'table {{.Names}}    {{.Ports}}'

A plain 11434:11434 mapping publishes on all host addresses by default. Don't rely on the process-listener check alone to explain container networking.

From a second machine you control, set OLLAMA_SERVER_IP to the Ollama machine's actual network address, then run:

curl --connect-timeout 5 "http://${OLLAMA_SERVER_IP}:11434/api/tags"

That is Ollama's read-only list-models endpoint, not an inference request. If it returns model-list JSON without credentials, that machine can reach your unauthenticated API. Even an empty model list is an answer. A refusal or timeout only describes that route at that moment, so test the public address from outside your LAN if you have one, and check IPv6, proxies and tunnels separately. Only test systems you own or have permission to check.

What to do

What an open endpoint buys an attacker

The open-endpoint LLMjacking case describes attackers scanning for model access to power their own operations. A local GPU gives them compute; a gateway backed by paid credentials can give them your bill too. The PoeLLM report included Ollama among compromised servers, but the researchers didn't identify an Ollama vulnerability. An open API isn't proof of host command execution, and that distinction matters.

The MLflow, NeMo and Agno fixes make the other half of the point: model infrastructure can contain ordinary server-side vulnerabilities, and patching and access control are separate jobs. MLflow's 3.17.0 fixes didn't clean up previously created malicious prompt versions. Agno's 2.3.24 replaced a dangerous evaluation path, but that isn't an Ollama authentication feature. Neither release secures your port 11434.

I don't need a model server to win an argument with an attacker. I need it to stop answering people I never invited.

Sources

← All briefs