Ollama quantization engine heap overflow leaks sensitive data
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.
Sourcekb.cert.org — open the original
What to check
- Applies to
- The 1 CVE named below. Whether you run an affected version is not assessed: check the versions the source lists.
- Exploitation
- No exploitation in the wild and no public exploit is recorded for the CVEs named.
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
Source reporting: https://kb.cert.org/vuls/id/518910
Free public brief. Slack alerts on the vendors you run come with the paid plans, and a new account gets three days of them, no card.
What this brief leaves out
This page is the free tier: the write-up, the severity, the names. In the app the same report carries live profiles of the CVEs it names. The paid plans add the security research and news reporting the free tier leaves out.
It sits in a corpus of 16,433 reports from 149 sources, 661 of them written in the last seven days, and it grows through the day.
A new account starts with three days of all of it, no card, then keeps the government and CERT reporting free. Slack alerts are a paid-plan feature: name the vendors you run and Slack hears about the reports that touch them, not the rest of the week's. Nothing is charged unless you subscribe.
Create a free account What it costs