# CVE-2026-65315: Ollama uncontrolled memory allocation in GGUF metadata parser

Source: https://junglewise.ai/threats/cve-2026-65315-ollama-uncontrolled-memory-allocation-in-gguf-metadata-parser  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-21. Updated: 2026-07-22  
License: CC BY 4.0 with a link back

CVE-2026-65315 · Severity: high · CVSS 7.5 · Published 2026-07-21

Ollama, a platform for running large language models, is vulnerable to a remote attack that can crash the entire server. By uploading a specially crafted, tiny model file (less than 1KB), an attacker can force the server to attempt to allocate massive amounts of memory, leading to an immediate and unrecoverable system failure. This disrupts all AI services provided by the server and may impact other applications running on the same host due to memory exhaustion.

Technologies: [Ollama](https://junglewise.ai/threats/technologies/ollama). Vendors: [Ollama](https://junglewise.ai/threats/vendors/ollama).

## Quick answers

**Is CVE-2026-65315 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-65315 being exploited in the wild.

**How severe is CVE-2026-65315?** High severity, with a CVSS score of 7.5, published 21 July 2026.

**Which products and versions are affected?** Ollama up to commit f0078ae.

**Is there a fix for CVE-2026-65315?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-65315 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-65315?** Check whether you run Ollama at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

An uncontrolled memory allocation vulnerability (CWE-789) exists in Ollama's GGUF metadata parser within `fs/ggml/gguf.go`. The parser reads length and count fields (string lengths, tensor dimension counts, and metadata array counts) directly from GGUF files and uses them as allocation sizes for `make()` calls or slice bounds without validating them against the actual file size. A remote, unauthenticated attacker can trigger this by uploading a sub-1KB crafted GGUF file via the `/api/blobs` and `/api/create` endpoints, or by inducing a model pull. This results in Go runtime fatal errors (out-of-memory) or `makeslice` panics that bypass standard recovery middleware, causing a complete process crash. The vulnerability affects versions up to commit f0078ae.

## Affected products

- Ollama Ollama up to commit f0078ae

## Timeline

- 2026-06-03: disclosed: Reported via Huntr
- 2026-07-05: other: Public GitHub issue opened
- 2026-07-21: advisory: NVD publication date

## References

- [https://github.com/ollama/ollama](https://github.com/ollama/ollama)
- [https://github.com/ollama/ollama/issues/17042](https://github.com/ollama/ollama/issues/17042)
- [https://www.vulncheck.com/advisories/ollama-remote-denial-of-service-via-attacker-controlled-allocation-in-gguf-metadata-parser](https://www.vulncheck.com/advisories/ollama-remote-denial-of-service-via-attacker-controlled-allocation-in-gguf-metadata-parser)

## Related threats

- [Ollama server-side request forgery in Pull API](https://junglewise.ai/threats/cve-2026-108836-a-vulnerability-has-been-found-in-ollama-up-to-0-34-1-the)
- [Ollama authorization bypass in experimental agent Bash tool approval](https://junglewise.ai/threats/cve-2026-102697-ollama-versions-0-14-0-before-0-31-2-contain-an-incorrect)
- [Ollama integer overflow in GGUF decoder](https://junglewise.ai/threats/cve-2026-86289-ollama-integer-overflow-in-gguf-decoder)
- [Ollama unvalidated redirect in model blob downloads](https://junglewise.ai/threats/cve-2026-85180-ollama-unvalidated-redirect-in-model-blob-downloads)
- [Ollama downloadBlob improper validation of array index denial of service](https://junglewise.ai/threats/cve-2026-15685-ollama-downloadblob-improper-validation-of-array-index-denial-of)
