CVE-2024-12055
📋 TL;DR
A vulnerability in Ollama versions up to 0.3.14 allows attackers to upload specially crafted gguf model files that cause an out-of-bounds read, crashing the server and creating a Denial of Service condition. This affects anyone running vulnerable Ollama servers, particularly those exposed to untrusted users who can upload models.
💻 Affected Systems
- Ollama
📦 What is this software?
Ollama by Ollama
⚠️ Risk & Real-World Impact
Worst Case
Malicious actors could repeatedly crash Ollama servers, causing sustained service disruption and preventing legitimate users from accessing AI model services.
Likely Case
Attackers exploit this to cause temporary service outages by uploading malicious model files to vulnerable servers.
If Mitigated
With proper access controls and network segmentation, impact is limited to internal service disruption rather than complete compromise.
🎯 Exploit Status
Exploitation requires ability to upload custom model files to the Ollama server, which typically requires some level of access or functionality.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: > 0.3.14
Vendor Advisory: https://huntr.com/bounties/7b111d55-8215-4727-8807-c5ed4cf1bfbe
Restart Required: Yes
Instructions:
1. Update Ollama to version 0.3.15 or later. 2. Restart the Ollama service. 3. Verify the update was successful.
🔧 Temporary Workarounds
Restrict Model Uploads
allDisable or restrict the ability for untrusted users to upload custom model files to the Ollama server.
Network Segmentation
allPlace Ollama servers behind firewalls and restrict access to trusted IP addresses only.
🧯 If You Can't Patch
- Implement strict access controls to limit who can upload models to the Ollama server
- Monitor server logs for repeated crashes or suspicious model upload attempts
🔍 How to Verify
Check if Vulnerable:
Check Ollama version with 'ollama --version' and verify if it's 0.3.14 or earlier.
Check Version:
ollama --version
Verify Fix Applied:
After updating, run 'ollama --version' to confirm version is 0.3.15 or later, then test model upload functionality.
📡 Detection & Monitoring
Log Indicators:
- Repeated Ollama service crashes
- Error messages related to gguf parsing failures
- Unusual model upload activity
Network Indicators:
- Multiple failed model upload attempts from single source
- Unusual traffic patterns to model upload endpoints
SIEM Query:
source="ollama.log" AND ("crash" OR "panic" OR "out of bounds" OR "gguf")