Bleeding Llama: Ollama GGUF Heap Read and Model Push
Cyera demonstrated that a crafted GGUF tensor size could make Ollama before 0.17.1 read beyond its heap buffer during F16-to-F32 conversion in /api/create; the flaw is tracked as CVE-2026-7482, a public vulnerability identifier. The leaked bytes were written into a model artifact and could be sent to an attacker registry through /api/push. Network exploitation requires an exposed API: the upstream Ollama binary defaults to 127.0.0.1, the official container image sets OLLAMA_HOST to 0.0.0.0, and operators can change the bind address themselves.
Threat Analysis
The GGUF model-creation API crossed two boundaries: it trusted a tensor's declared size during F16-to-F32 conversion, then allowed the resulting artifact to be pushed outward. The read was a product memory-safety bug, while the unauthenticated management API made it remotely reachable where operators exposed Ollama.
- The attacker must reach /api/blobs, /api/create and /api/push through non-default network exposure or an allowed local route; upstream defaults to loopback.
- A GGUF tensor declares more elements than its actual data buffer contains and is uploaded to /api/blobs.
- The attacker creates a model from the blob and requests F32 output; the vulnerable conversion reads past the heap allocation and writes neighboring bytes into the new model.
- The model is named for an attacker-controlled registry and /api/push uploads the resulting artifact, which may contain prompts or other process memory from the test.
Ollama upstream defaults to 127.0.0.1, not 0.0.0.0. Cyera demonstrated the chain in a controlled environment; neither a generic exposed endpoint nor this CVE alone establishes a real victim's secrets were stolen.
Applicable AIDEFEND Defenses (8)
What Defenders Should Do Now
- Upgrade Ollama to 0.17.1 or later on every instance that may process untrusted GGUF data.
- Inventory actual OLLAMA_HOST, reverse-proxy, Docker port-publish, same-network container, Kubernetes Service and NetworkPolicy reachability. An internal container listener does not by itself establish external exposure or isolation. Authenticate the management API and authorize exact HTTP method/path pairs for model operations.
- Default-deny outbound connections and prefer a controlled pull-only mirror. If the public registry remains reachable, separately deny unauthorized /api/push; destination filtering alone cannot stop a push to an attacker namespace there.
1 additional consideration
Evidence and deployment boundary
Conclusion
Last updated: