CVE-2025-66960

7.5 HIGH

📋 TL;DR

A vulnerability in ollama v0.12.10 allows remote attackers to cause denial of service by sending specially crafted GGUF files. The readGGUFV1String function fails to properly validate string length values from untrusted metadata, causing the application to panic and crash. This affects anyone running vulnerable ollama instances that process external GGUF files.

💻 Affected Systems

Products:
  • ollama
Versions: v0.12.10
Operating Systems: All platforms running ollama
Default Config Vulnerable: ⚠️ Yes
Notes: Any ollama instance that processes GGUF files from untrusted sources is vulnerable. The vulnerability is in the GGUF parsing code.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service disruption through repeated crashes, potentially leading to extended downtime if automated attacks target the service.

🟠

Likely Case

Intermittent service interruptions when malicious GGUF files are processed, requiring manual restart of ollama instances.

🟢

If Mitigated

Limited impact with proper input validation and monitoring, allowing quick detection and recovery from crashes.

🌐 Internet-Facing: HIGH - Remote attackers can trigger the vulnerability without authentication by sending malicious GGUF files.
🏢 Internal Only: MEDIUM - Internal users with access to ollama could cause service disruption, but requires file upload capability.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Proof of concept details are publicly available in the references. Creating malicious GGUF files requires understanding of the format but is straightforward.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v0.12.11 or later

Vendor Advisory: https://github.com/ollama/ollama/issues/9820

Restart Required: Yes

Instructions:

1. Stop ollama service. 2. Update ollama to v0.12.11 or later using your package manager or download from official sources. 3. Restart ollama service.

🔧 Temporary Workarounds

Restrict GGUF file sources

all

Only allow GGUF files from trusted sources and implement input validation for GGUF metadata

Implement rate limiting

all

Limit the rate of GGUF file uploads/processing to reduce impact of repeated attacks

🧯 If You Can't Patch

  • Implement network segmentation to isolate ollama instances from untrusted networks
  • Deploy monitoring and automated restart mechanisms to detect and recover from crashes

🔍 How to Verify

Check if Vulnerable:

Check ollama version: ollama --version. If version is exactly 0.12.10, the system is vulnerable.

Check Version:

ollama --version

Verify Fix Applied:

After updating, verify version is 0.12.11 or later: ollama --version

📡 Detection & Monitoring

Log Indicators:

  • Panic logs containing 'readGGUFV1String'
  • Unexpected ollama process crashes
  • Error messages related to GGUF parsing

Network Indicators:

  • Multiple GGUF file uploads from single source in short time
  • Unusual patterns in GGUF file processing requests

SIEM Query:

process.name:"ollama" AND (log_message:"panic" OR log_message:"readGGUFV1String" OR log_message:"GGUF")

🔗 References

📤 Share & Export