CVE-2026-7482: Ollama contains a heap out-of-bounds read vulnerability in the GGUF model loader
Ollama before 0.17.1 has a heap out-of-bounds read in its GGUF model loader. An unauthenticated attacker who can reach /api/create can upload a crafted GGUF file, make the server read past a buffer, and then push the resulting model to their own registry through /api/push. Leaked memory can hold API keys, environment variables, system prompts and other users' conversations. Upgrade to 0.17.1.
Published May 4, 2026 · Updated May 8, 2026 · Analysis Oct 28, 2026
What an attacker can do
The /api/create endpoint accepts a GGUF file. In the crafted file, the declared tensor offset and size exceed the file's real length. When Ollama quantizes the model, in fs/ggml/gguf.go and server/quantization.go (WriteTo()), it reads beyond the allocated heap buffer. The bytes it reads past the end are written into the new model artifact.
The attacker then calls /api/push to upload that model to a registry they control and reads the leaked memory from it. According to the advisory, that memory may include environment variables, API keys, system prompts and concurrent users' conversation data. The two endpoints have no authentication in the upstream distribution.
Ollama binds to 127.0.0.1 by default, which limits exposure. The advisory notes that the documented OLLAMA_HOST=0.0.0.0 setting is widely used and that large public-internet exposure has been observed. Any such instance is open to this attack with no credentials and no user interaction, which is why the network vector is rated with high confidentiality and availability impact. The PR that closed the flaw describes the fix only as validating sizes against the tensor shape during quantization.
Who is affected
Ollama before 0.17.1. Instances bound to 0.0.0.0 or otherwise reachable from untrusted networks are at risk; default loopback-only installs are much less so. Check the version:
ollama --versionFor the Go module: go list -m github.com/ollama/ollama.
github.com/ollama/ollama
- Ecosystem
- Go
- Affected
- < 0.17.1
- Fixed in
- 0.17.1
- Check
go list -m github.com/ollama/ollama
How to fix it
Upgrade to Ollama 0.17.1 or later, using your platform's installer or the release page. Pull request 14406 was merged on 25 February 2026 and the fix commit is 88d57d0.
The sources give no other workaround, but these steps follow from the flaw: keep OLLAMA_HOST on 127.0.0.1, and if you must expose Ollama, put it behind an authenticating reverse proxy that blocks /api/create and /api/push from untrusted clients. Treat any secrets in the memory of an exposed server as possibly leaked and rotate them.
How to tell if you were hit
Check Ollama server logs and proxy logs for POST requests to /api/create from addresses you do not know, followed by /api/push calls. Look for models in ollama list that you did not create, or uploads to registries that are not yours. Use outbound network logs to find connections from the Ollama host to unfamiliar registry hosts. Exposed instances can be checked with a scan of port 11434 from outside your network.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Ollama before 0.17.1 contains a heap out-of-bounds read vulnerability in the GGUF model loader. The /api/create endpoint accepts an attacker-supplied GGUF file in which the declared tensor offset and size exceed the file's actual length; during quantization in fs/ggml/gguf.go and server/quantization.go (WriteTo()), the server reads past the allocated heap buffer. The leaked memory contents may include environment variables, API keys, system prompts, and concurrent users' conversation data, and can be exfiltrated by uploading the resulting model artifact through the /api/push endpoint to an attacker-controlled registry. The /api/create and /api/push endpoints have no authentication in the upstream distribution. Default deployments bind to 127.0.0.1, but the documented OLLAMA_HOST=0.0.0.0 configuration is widely used in practice (large public-internet exposure observed).
Questions
- Is Ollama 0.17.0 affected by CVE-2026-7482?
Yes. Every version before 0.17.1 is affected. The fixed version is 0.17.1.
- Does the attacker need credentials?
No. The advisory says /api/create and /api/push have no authentication in the upstream distribution. The attacker only needs network access to the port.
- Am I safe if Ollama only listens on localhost?
Much safer. The default binds to 127.0.0.1. The risk rises sharply with OLLAMA_HOST=0.0.0.0 or any port forward to the internet.
- What can leak?
The advisory lists environment variables, API keys, system prompts and concurrent users' conversation data from the server's heap.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Ollama vulnerabilities
All Ollama entriesCVE-2026-7020
Ollama is Vulnerable to Path Traversal
low5.6No fixApr 26, 2026CVE-2025-63389
Ollama Platform has missing authentication enabling attackers to perform model management operations
critical9.3No fixDec 18, 2025CVE-2025-44779
Ollama allows deletion of arbitrary files
medium6.6Aug 7, 2025CVE-2025-51471
Ollama vulnerable to Cross-Domain Token Exposure
medium6.9No fixJul 22, 2025CVE-2025-1975
Ollama Server Vulnerable to Denial of Service (DoS) Attack
high7.5No fixMay 16, 2025CVE-2024-12055
Ollama Allows Out-of-Bounds Read
high7.5No fixMar 20, 2025
