CVE-2025-66959
📋 TL;DR
A vulnerability in ollama's GGUF decoder allows remote attackers to trigger a denial of service by sending specially crafted input. This affects all systems running vulnerable versions of ollama that expose the service to untrusted networks. The issue stems from improper input validation when processing GGUF model files.
💻 Affected Systems
- ollama
📦 What is this software?
Ollama by Ollama
⚠️ Risk & Real-World Impact
Worst Case
Complete service unavailability requiring manual restart, potentially disrupting AI inference workloads and dependent applications.
Likely Case
Service crashes when processing malicious GGUF files, requiring restart and causing temporary service interruption.
If Mitigated
Minimal impact if service is isolated behind proper network controls and input validation.
🎯 Exploit Status
Proof of concept details are publicly available in the references, making exploitation straightforward for attackers.
🛠️ 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
Network isolation
allRestrict ollama service to trusted networks only
# Configure firewall to block external access to ollama port (default 11434)
sudo ufw deny 11434
# Or use specific IP whitelisting
Input validation proxy
allDeploy a reverse proxy to validate GGUF files before they reach ollama
# Implement custom middleware or use WAF to inspect GGUF headers
🧯 If You Can't Patch
- Implement strict network segmentation to isolate ollama from untrusted networks
- Monitor for service crashes and implement automated restart mechanisms
🔍 How to Verify
Check if Vulnerable:
Check ollama version: ollama --version. If version is 0.12.10 or earlier, system is vulnerable.
Check Version:
ollama --version
Verify Fix Applied:
After updating, verify version is 0.12.11 or later and test with known safe GGUF files.
📡 Detection & Monitoring
Log Indicators:
- Panic messages in logs containing 'GGUF decoder' or 'unchecked length'
- Service crash/restart events
- Unexpected termination of ollama process
Network Indicators:
- Unusual GGUF file uploads from untrusted sources
- Multiple connection attempts to ollama port 11434
SIEM Query:
process.name:"ollama" AND (log_message:"panic" OR log_message:"GGUF" OR event_type:"crash")