Patchfirst
CVE-2026-7482 Public exploit Critical · 9.1 EPSS 7.1%

Ollama heap out-of-bounds read in GGUF tensor parsing leaks server process memory to unauthenticated remote attackers

Fix:upgrade ollama to 0.17.1 or later also fixes CVE-2024-37032 Details ↓

ollama · ollama

Summary

Ollama versions before 0.17.1 contain a heap out-of-bounds read in the GGUF model loader, where the server processes attacker-supplied model files through the /api/create endpoint during quantization. An unauthenticated remote attacker who can reach that endpoint, which by default is limited to localhost but is often exposed via OLLAMA_HOST=0.0.0.0, can upload a crafted GGUF file with inflated tensor offsets and sizes to leak server process memory, then exfiltrate the resulting artifact through the /api/push endpoint to an attacker-controlled registry.

Official description · CVE.org

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).

Breakdown
72.7 / 100
Exploited
Yes, in VulnCheck KEV
Reports
0
Tactics
0/15

First seen exploited 35 days after disclosure. Public exploit code (PoC-in-GitHub) appeared 1 day after disclosure.

  1. Disclosedday 0
  2. Public exploit codePoC-in-GitHub+1 day
  3. First seen exploitedVulnCheck KEV evidence+35 days

Affected versions and fixes

as published in the CVE record

ollama ollama

Affected: < 0.17.1

Fix

Upgrade to ollama 0.17.1 or later. The fix in PR #14406 validates that declared tensor offset+size do not exceed the GGUF file size before reading, and adds a length check in the quantizer prior to the unsafe read.

Workaround

Until upgrade is possible: (1) ensure Ollama is bound to a trusted interface only (default OLLAMA_HOST=127.0.0.1); (2) front Ollama with a reverse proxy that requires authentication on /api/create and /api/push; (3) restrict outbound network egress from the Ollama host to prevent exfiltration via /api/push to attacker-controlled registries.

Attack pattern (CAPEC)

CAPEC-540 Overread Buffers

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: github.com/ollama/ollama.

Gogithub.com/ollama/ollamaGHSA-x8qc-fggm-mpqgGO-2026-5748

Upgrade to 0.17.1 or later

Fixes this CVE and 1 other known vulnerability in this package (CVE-2024-37032).

Gogo get github.com/ollama/ollama@v0.17.1

The first fix for CVE-2026-7482.

Affected versions

If you runUpgrade to
All versions before 0.17.10.17.1

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

Also mentioned in 11 community threat pulses (AlienVault OTX)

Weaker evidence

Pulses are indicator collections that anyone can publish. A mention is not confirmation of exploitation.

References

3 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close