Never expose Ollama to the internet without a login
Rapid7: 54.8% of 7,675 exposed Ollama servers already carried models planted by strangers · Security incident · Rapid7 blog · rapid7 · Nov 18, 2026
What happened
Rapid7 scanned 20,354 pre-selected hosts on 10 November and found 7,675 Ollama servers answering without authentication. 4,209 of them (54.8%) listed models left by someone else, such as callback addresses and Base64 file paths decoding to /etc/shadow. 79% listed cloud-routed models, which Rapid7 says can let strangers use a signed-in owner's paid ollama.com account.
How to prevent it
Bind Ollama to 127.0.0.1 or a private network, put an authenticating proxy in front if you need remote access, and if your model list shows names you didn't pull, treat the box as compromised and rotate what's in its environment.
Fix prompt for your own AI tool
Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.
I run Ollama for my app or for local AI coding. Help me check it isn't open to strangers. 1) Tell me how to see which address Ollama listens on (OLLAMA_HOST) and flag 0.0.0.0 or a public IP. 2) Show me how to list my models and explain which names would look like a stranger's (IP addresses, tunnel domains, ttl.sh, names like beacon, probe or pwn). 3) If remote access is needed, show me how to put an authenticating reverse proxy in front instead of opening port 11434. 4) If I find a stranger's model, give me the steps: rotate secrets in the service's environment, revoke the Ollama key on my ollama.com account, check usage, and rebuild. Don't change anything until I've approved your plan. Never ask me to paste API keys, passwords or .env contents; tell me where to check them myself.
Why this keeps happening: self-hosted models & ai servers
Model servers such as Ollama, llama.cpp, vLLM and Gradio were built for a trusted laptop or lab. Many have no login, and one setting change puts them on a public address. Model files can also carry code that runs when they load.
A quick checklist before you ship
- Check which address each model server listens on and bind it to localhost or a private network.
- Put an authenticating proxy in front of anything that must be reachable remotely.
- Update model servers as often as your app dependencies.
- Download models only from the original publisher, prefer safetensors, and keep trust_remote_code off.
More on this: every self-hosted models & ai servers story and our related guide.
Tools involved
Ollama stories, Qwen stories, Llama stories, DeepSeek stories
Related stories
- Update llama.cpp to b12658+ and never expose its RPC server
llama.cpp RPC server: unauthenticated attackers could write to memory and possibly run code (CVE-2026-137567, critical), fixed in b12658 - Ask how your AI IDE handles tool calls from open models
AWS Kiro Web: agents on DeepSeek v3.2, Qwen3-coder-next, GLM-5 and MiniMax could run commands hidden in files they read (CVE-2026-136267) - Update Gradio to 6.32.0+ if you self-host a Gradio app
Gradio 6.27.0 before 6.32.0: a forged 'Host: localhost' header let strangers use the operator's own Hugging Face token (CVE-2026-134825)
Source: original post on Rapid7 blog ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.