With the popularity of large models (LLMs), open-source localized deployment frameworks, represented by Ollama, have dramatically lowered the threshold for developers to use and manage AI models. However, this convenience has also spawned new, large-scale security risks. A recent study jointly published by SentinelOne, Censys, and Pillar Security reveals the startling fact that there are more than 175,000 publicly exposed instances of Ollama on the Internet globally, creating a massive AI computing infrastructure security attack surface risk
This report aims to analyze the technical aspects of this incident. This report aims to provide an in-depth technical analysis of this incident, analyze its attack surface, realistic threats, systemic risks, and propose corresponding enterprise-level security hardening and governance strategies.
1. Introduction: Ollama and the rise of localized AI
Ollama is an open source framework that allows developers to easily download, run, and manage all types of large-scale language models on personal computers (Windows, macOS, Linux) or servers. Its core value is to simplify the deployment process of localized AI and enable developers to quickly build private, customizable AI services. By default, Ollama services are bound only to local loopback addresses (127.0.0.1:11434) to ensure that it is only accessible locally. However, a seemingly trivial configuration change - changing the bind address to the0.0.0.0or any public network interface - would have completely exposed its API to the public network. It was this simple misconfiguration that led to this massive exposure.
2. Exposure surface analysis: a global AI network without a master
According to the study, the 175,000 exposed instances discovered constitute an unprecedented, globally spanning "shadow AI network". Its scale and characteristics merit in-depth analysis.
2.1 Geographic Distribution and Network Environment
Exposed Ollama hosts are located in 130 countries around the world, showing a wide geographical distribution. Among them, China tops the list with more than 30%, followed by technologically developed countries such as the United States, Germany, France, and South Korea. This distribution suggests that the Ollama epidemic is global, but the spread of security awareness has not kept pace with its deployment.
Of even greater concern is the fact that these hosts not only exist in traditional cloud service providers (e.g., AWS, Azure, Google Cloud), but are also heavily distributed in residential broadband networks. This hybrid deployment environment greatly increases the complexity of governance, as residential networks typically lack enterprise-grade security monitoring and management mechanisms.
Main countries of exposure
1. China (>30%)
2. United States
3. Germany
4. France
5. Korea
6. India
7. Russia
8. Singapore
9. Brazil
10. United Kingdom
Table 1: Distribution of Top 10 Countries with Publicly Exposed Ollama Instances
Heat map of attack surface distribution for AI Ollama exposed instances
Figure 1: Heat map of global Ollama exposure instance distribution
2.2 High-risk capabilities: from text generation to privileged operations
The most alarming finding of the report is that of all the exposed hosts, theNearly half (over 48%) have Tool-calling enabled.. Tool calls, also known as function-calling, allow LLMs to interact with the outside world, such as executing native code, calling external APIs, and accessing database or operating system resources. This capability fundamentally changes the threat model.
"A plain text generation endpoint can produce harmful content, but a tool-enabled endpoint can perform privileged operations. When combined with insufficient authentication and network exposure, this constitutes the highest severity risk within the ecosystem in our assessment." -- SentinelOne researcher
This means that instead of just talking to a chatbot, an attacker may be able to execute commands directly on the victim's machine through an API that is not password-protected. Additionally, the study found 201 hosts running "uncensored" alert templates with security fences removed, making it easier to generate malicious content or trigger dangerous behavior.
Figure 2: Threat modeling of text generation endpoints vs. tool invocation endpoints
3. Threat modeling and real-world attacks: LLMjacking
In response to these exposed AI infrastructures, a new type of attack called "LLMjacking" has emerged. The attacker hijacks the victim's LLM computing resources to serve its own purposes, while the victim bears all the computing costs.
3.1 LLMjacking Attack Flow
LLMjacking attacks usually follow a standard process that starts with unauthorized access and ends with resource misuse and commercial realization.
1.Reconnaissance and discovery: Attackers use automated tools such as masscan to massively scan the Internet for the open Ollama default port (11434) or other known AI service ports.
2.Validation and Evaluation: Upon discovering an open port, the attacker sends a test request to verify that it is a valid, unauthenticated AI service and to evaluate its performance and available models.
3.resource hijacking and abuse: Once a target is identified, an attacker can utilize its computing resources to perform a variety of malicious tasks, including:
•Large-scale content generation: For spamming, phishing, and disinformation campaigns.
•cryptocurrency mining: Although LLM is not optimized for mining, it can still generate revenue in the case of large-scale hijacking.
•Malware development: Utilize AI-assisted writing, obfuscation, and mutation of malicious code.
•Brute force cracking and voucher filling: Generate a password dictionary or automate login attempts.
4.Commercialization Realization: Packaging hijacked AI access for resale on the dark web or specialized markets as a form of "cheap AI power".
Figure 3: Complete flow of LLMjacking attack
3.2 "Operation Bizarre Bazaar": an example of commercialization of LLMjacking
LLMjacking is not a theoretical risk; researchers at Pillar Security have discovered and attributed a real-life attack campaign called "Operation Bizarre Bazaar". The campaign is run by a threat actor named "Hecker" (aka Sakuya, LiveGamer101), who has created an attacker calledsilver.inc's website, which acts as a unified LLM API gateway, openly sells access to AI services hijacked from the Internet.
The modus operandi of this market clearly demonstrates the complete industry chain of LLMjacking: from automated network-wide scanning, to quality of service verification, to eventual commercial resale. This marks the evolution of attacks against AI infrastructure from sporadic individual acts to organized, profit-driven criminal activities.
4. Systemic risks and governance challenges
The Ollama exposure revealed deep systemic risks and governance challenges in a decentralized AI deployment model.
•The Governance Divide: Exposed hosts span both cloud and residential networks, invalidating traditional, perimeter-based enterprise security models. Security teams are unable to effectively monitor and manage employees' homes or unreported cloud instances.
•New attack vectors: These orphaned AI nodes provide an ideal testing ground and springboard for attacks such as cue injection, data poisoning, and model contamination. Attackers can use these nodes to proxy malicious traffic and hide its true origin.
•Supply Chain Risks: An instance of Ollama with tool call functionality enabled, if used to automate processes within an organization, could become an entry point for attackers to penetrate an organization's intranet, posing a serious supply chain security risk.
•Lagging security awareness: Ollama's ease of use has attracted a large number of developers, but many may not realize that simple network configuration errors can have such serious security consequences. There is a clear disconnect between technology diffusion and security education.
5. Mitigation measures and safety recommendations
In the face of this new type of threat, organizations and individual developers must revisit their AI deployment strategies and adopt stringent security measures.
5.1 Core security principles
Treat local LLM as a privileged service: Any AI service capable of executing code or interacting with external systems should be treated as critical infrastructure at the same level as a database or management backend, with appropriate security controls imposed.
5.2 Specific technical recommendations
level
Suggested measures
explicit description
network layer
Insist on local binding
Always bind the Ollama service to the127.0.0.1. If remote access is required, secure tunneling techniques (e.g., VPN, SSH tunnels, Tailscale, ZeroTier) should be used rather than exposing ports directly.
Figure 4: Architecture of safe vs. hazardous configurations
Enforcement of firewall rules : Configure strict firewall rules at the host and network level to allow only traffic from trusted IP addresses to access AI service ports.
application layer (computing)mandatory certification : Deploy a reverse proxy (e.g. Nginx, Caddy) on the Ollama front-end and configure it with mandatory authentication mechanisms (e.g. HTTP Basic Auth, OAuth2, client certificates).
API Rate Limiting : Enforce rate limiting on API endpoints to prevent brute force and denial of service attacks.
Monitoring and Auditing:Establishment of an inventory of assets Enterprises should create a dynamic inventory of AI assets and use network scanning tools to regularly discover unauthorized AI services in internal and external networks.
Log Monitoring and Alerting : Monitor Ollama's access logs and operation logs, and set up alerts for unusual access patterns (e.g., requests from unknown IPs, high-frequency API calls).
configuration management :security baselineDevelop and enforce a baseline of security configurations for AI deployments, and incorporate security configurations into the CI/CD process for automated checks.
6. Conclusion
The public exposure of 175,000 Ollama instances is a concentrated outbreak of the "shadow IT" problem in the AI era. It clearly shows that the traditional, centralized security governance model is facing serious challenges as AI technology sinks to the edge and personal devices. Attackers have begun to systematically use these unattended AI resources to form a complete criminal chain from reconnaissance to realization.
For the security community, this is a wake-up call. We must bring AI infrastructure, especially "agent" AI that has the ability to interact with the outside world, under the highest level of security control. For developers in general, embracing open source and convenience must be accompanied by a shift to the left of security and a "security by default" mindset from the very first step of deployment. Otherwise, the AI assistant that brings us convenience today may become a Trojan horse that leads wolves into the house tomorrow.
Original article by Chief Security Officer, if reproduced, please credit https://www.cncso.com/en/ai-ollama-attack-surface-analysis-report.html