Finding thousands of exposed Ollama instances using Shodan

67 rldjbpin 40 9/3/2025, 8:18:07 AM blogs.cisco.com ↗

Comments (40)

larodi · 3h ago
I’d expect Cisco to publish an article on thousands of Cisco devices with default passwords still there in the open.

Definitely not credible to speak about ML stuff and of course - Ollama has never been production-ready in the sense iOS (Cisco’s) was.

dlachausse · 2h ago
How is it Cisco’s fault that a lot of network administrators are incompetent and don’t change default passwords?
jamesnorden · 3m ago
By forcing them to change the defaults, like Ubiquiti does, for instance.
msh · 1h ago
Having default passwords for a product that is designed to be connected to a network that the users are not forced to change is incomprehensible incompetent for any product produced the last 25 years.
maweki · 2h ago
Cisco is incredibly (in)famous for having hardcoded backdoor accounts in their products.
thevinchi · 3h ago
I can think of no reason to be surprised by this, except that Cisco is the one reporting it. That part is surprising.
alexandru_m · 3h ago
Apparently, protecting the API is not planned: https://github.com/ollama/ollama/issues/849

For my own purposes I either restrict ollama's ports in the firewall, or I put some proxy in front of it that blocks access of some header with some predefined api key is not present. Kind of clunky, but it works.

omneity · 1h ago
Yeah it’s a pretty crazy decision to be honest. Flashbacks to MongoDB and ElasticSearch’s early days.

Fortunately it’s an easy fix. Just front it with nginx or caddy and expect a bearer token (that would be your api key)

kaptainscarlet · 1h ago
You can easily protect the api with nginx basic auth
alexandru_m · 3h ago
Correction: ...blocks access IF some header...
stoneyhrm1 · 1h ago
I understand the concern here but isn't this the same as making any other type of server public? This is just regarding servers hosting LLMs, which I wouldn't even consider a huge security concern vs hosting a should-be-internal tool publicly.

Servers that shouldn't be made public are made public, a cyber tale as old as time.

cube00 · 6m ago
> servers hosting LLMs, which I wouldn't even consider a huge security concern

The new problem is if the LLMs are connected to tooling.

There's been plenty of examples showing that with subtle changes to the prompt you can jailbreak the LLM to execute tooling in wildly different ways from what was intended.

They're trying to paper over this by having the LLM call regular code just so they can sure all steps of the workflow are actually executed.

Havoc · 3h ago
Similarly a lot of projects using gradio come with a tunnel/public proxy enabled out of the box. ie instantly publicly accessible just by running it. Behind a long unique uuid looking url which provides some measure of security by obscurity but wow was still surprised first time I saw that.

Must be a good time to be in security space with this sort of stuff plus the inevitable vibe code security carnage

ahtihn · 1h ago
> Behind a long unique uuid looking url which provides some measure of security by obscurity

That's not security by obscurity.

If the "uuid looking" part is generated using a csprng and has enough entropy, it has the same security properties as any other secret.

There's other issues with having the secret in the URL.

BananaaRepublik · 13m ago
Shodan? Like from system shock?
Tiberium · 1h ago
The article itself appears to be largely AI-edited. And I'm really surprised that anyone would want to write an article on this, I assumed it was widely known? You can go onto Censys and find thousands of exposed instances for lots of self-hostable software, for LLM there are exposed instances of things like kobold, for image gen there's sd-webui, InvokeAI and more.
pbhjpbhj · 2h ago
>each identified endpoint is programmatically queried to assess its security posture, with a particular focus on authentication and authorization mechanisms.

I know it's commonplace, but is this unauthorized access in terms of the CMA (UK) or CFAA (USA)?

andygeorge · 24m ago
Another great use of a personal VPN - I work at https://www.defined.net (which uses Nebula as the underlying VPN technology) and also personally use our free tier (up to 100 hosts) for everything. Having my Ollama instances available only over my VPN overlay network is very slick.
mkrecny · 2h ago
largely the fault of n8n
zackify · 1h ago
Why are people running ollama on public servers.

Is this thanks to everyone thinking they can code now and not understanding what they’re doing.

Make it make sense

NitpickLawyer · 52m ago
This has nothing to do with "everyone thinking they can code now", come on! People aren't asking cc to setup their cloud instances of ollama, they're likely getting a c/p line from a tutorial, just like they've always done.

What's likely happening here is that people are renting VMs and one-line some docker-compose up thing from a tutorial. And because it's a tutorial and people can't be bothered to tunnel their own traffic, most likely those tutorials are binding on 0.0.0.0.

Plenty of ways to footgun yourself with c/p something from a tutorial, even if you somewhat know what you're doing. No need to bring "everyone thinking they can code" into this. This is a tale as old as the Internet.

Another thing is that docker, being the helpful little thing that it is, in its default config will alter your firewall and open up ports even if you have a rule to drop everything you're not specifically using. So, yeah. That's probably what's happening.

deadbabe · 3h ago
The stakes aren’t that high yet for Ollama to warrant cumbersome auth mechanisms.
reilly3000 · 2h ago
If any MCP servers are running, anyone with access to query the chat endpoint can use them. That could include file system access, GitHub tokens and more.
stoneyhrm1 · 1h ago
The LLM endpoint via ollama or huggingface is not the one executing MCP tool calls, that is on behalf of the client that is interacting with the LLM. All the LLM does is take input as a prompt and produce a text output, that's it. Anything else is just a wrapper.
deadbabe · 15m ago
That is is completely false, ollama has nothing to do with running commands, it just processes prompts to text responses.
jangxx · 2h ago
ollama can't connect to MCP servers, it can merely run models which output instructions back to a connected system to connect to an MCP server (e.g mcphost using ollama to run a prompt and then itself connecting to an MCP server if the response requires it).
jychang · 3h ago
Yeah, I don't think most people who even run ollama would care. "Oh no, someone found my exposed instance, which means my computer in my bedroom is burning electricity for the past few hours. Oh well, I lost a few pennies in electricity." Shuts down Ollama on the computer.

Seriously, this is extremely mild as far as issues go. There's basically no incentive to fix this problem, because I bet even the people who lost a few pennies of electricity would still prefer the convenience of ollama not having auth.

Plus, that's the worst case scenario, in real life even if some black hat found an exposed ollama service, they have no interest in generating tokens for <insert random LLM here at 4 bit quant> at a slow speed of <50tok/sec.

dns_snek · 2h ago
If you think that's the worst case scenario you're in no position to be making security-related decisions. That line of thinking hinges on a very dangerous assumption that Ollama doesn't have any critical security vulnerabilities [1].

Don't expose services to the public internet unless they have been battle hardened to be exposed to the public internet, e.g. Nginx as an authenticating reverse proxy.

[1] https://github.com/advisories/GHSA-vq2g-prvr-rgr4

42lux · 2h ago
Is that agency over yourself called vibe living?
ekianjo · 3h ago
That is assuming you cannot exploit the server to get access to the machine...
ekianjo · 3h ago
Ollama has no auth mechanism by default... You have to wonder why they never focused on that
47282847 · 3h ago
Separation of concerns?

If you deploy a power plug outside your house, is it the fault of the power plug designer if people steal your power?

Put it behind a webserver with basic auth or whatever you fancy, done.

ekianjo · 3h ago
Bad analogies are bad analogies. ollama is a server system, it should expect to connect with more than one client and they know very well by now that this also means networked clients. If you create a server client protocol, implementing security is your job.
phito · 2h ago
Any decent router is going to block connections from internet to your local network by default. For ollama to be accessible from the outside, they had to allow it explicitly. There's no way to blame ollama for this.
graemep · 2h ago
Lots of servers do not, Redis for instance does not have auth by default, and IIRC did not have auth at all for a long time.
A4ET8a8uTh0_v2 · 53m ago
As cynical as I am, I honestly don't think there is much to wonder about here. The initial product's adoption relied on low friction and minimal setup. That they wanted to keep it going as long as possible is just an extension of this.
cedws · 3h ago
I don’t think it was intended for production workloads.
muldvarp · 3h ago
Should have asked an LLM to write one.
rvz · 2h ago
> You have to wonder why they never focused on that

Well YC companies "need the best engineers".

Yet this one didn't even think about build a simple auth mechanism whilst knowingly running a web server that is broadcasting across the internet, instead of doing it locally.

Gormo · 57m ago
Ollama doesn't run a web server that is "broadcasting across the internet". It runs a server that is accessible locally. You have to deliberately deploy it onto a public server in order for it to be accessible from the internet.