# Ollama's model quantization engine contains an out-of-bounds heap memory vulnerability…

Published: 2026-04-22 · Severity: critical
Canonical: https://vorant.io/reports/821062ec-8e96-4c1b-9c63-830111ff4dd4/ollama-s-model-quantization-engine-contains-an-out-of-bounds-heap-memory

> Ollama's model quantization engine contains an out-of-bounds heap memory vulnerability (CVE-2026-5757) allowing unauthenticated attackers to exfiltrate sensitive data via crafted GGUF files.

Ollama, an open-source tool for running large language models locally across macOS, Windows, and Linux, contains a critical vulnerability in its model quantization engine. The flaw allows an attacker with access to the model upload interface to craft a malicious GPT-Generated Unified Format (GGUF) file that triggers out-of-bounds heap memory reads and writes. The vulnerability stems from three combined factors: lack of bounds checking on tensor metadata, unsafe memory access using Go's unsafe.Slice function with attacker-controlled element counts, and a data exfiltration path through Ollama's registry API that allows pushing compromised model layers to attacker-controlled servers.

The vulnerability is particularly concerning because it enables unauthenticated remote information disclosure without requiring prior authentication. An attacker can upload a specially crafted model file, trigger the quantization process, and cause the server to read beyond intended memory boundaries. The leaked heap data is then inadvertently processed and written into a new model layer, which can be exfiltrated using Ollama's built-in registry push functionality. This creates a complete chain from memory disclosure to data exfiltration.

No patch is currently available as CERT/CC was unable to reach the vendor for coordination. Organizations running Ollama should immediately restrict or disable model upload functionality, especially in environments exposed to untrusted networks. Deployments should be limited to trusted network environments, and if model uploads are operationally necessary, only accept models from verified sources with strict validation controls.

## Mentioned in this report

- Vulnerabilities: CVE-2026-5757

Source reporting: https://kb.cert.org/vuls/id/518910

---

This is the free public brief from Vorant Threat Intelligence. When citing, attribute "Vorant" and link https://vorant.io/reports/821062ec-8e96-4c1b-9c63-830111ff4dd4/ollama-s-model-quantization-engine-contains-an-out-of-bounds-heap-memory.
Full IOC sets, deployable detections, the entity graph, TAXII 2.1 feed and real-time alerts: https://vorant.io/signup
