A flaw has been found in Ollama up to 18.1. This issue affects some unknown processing of the file server/download.go of the component Model Pull API. Executing a manipulation can lead to server-side request forgery. The attack can be launched remotely. The vendor was contacted early about this disclosure but did not respond in any way.
CVE-2026-5530 is a Server-Side Request Forgery (SSRF) vulnerability in Ollama versions up to 18.1 affecting the Model Pull API component. With a CVSS score of 6.3 (medium), this vulnerability allows remote attackers to manipulate server requests without authentication. The lack of vendor response and available patches presents significant risk for organizations deploying Ollama in production environments.
Immediate Actions:
1. Inventory all Ollama deployments across your organization and document versions in use
2. Isolate Ollama instances from direct internet access using network segmentation and firewall rules
3. Implement strict egress filtering to restrict outbound connections from Ollama servers
4. Monitor Model Pull API endpoints for suspicious activity
Compensating Controls:
1. Deploy Web Application Firewall (WAF) rules to detect and block SSRF patterns in API requests
2. Implement request validation and URL whitelisting for model pull operations
3. Use network-level controls (proxy, firewall) to restrict Ollama's ability to reach internal services
4. Enable comprehensive logging and monitoring of all API calls to server/download.go
5. Implement rate limiting on Model Pull API endpoints
Detection Rules:
1. Monitor for requests containing internal IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) in model pull parameters
2. Alert on localhost/127.0.0.1 references in API requests
3. Track unusual outbound connections from Ollama processes to internal services
4. Monitor for file:// or gopher:// protocol usage in API parameters
Patching:
1. Contact Ollama vendor for security updates or consider alternative AI model serving solutions
2. Evaluate upgrading to versions beyond 18.1 when available
3. If upgrade not possible, maintain compensating controls indefinitely
الإجراءات الفورية:
1. قم بحصر جميع نشرات Ollama عبر مؤسستك وتوثيق الإصدارات المستخدمة
2. عزل مثيلات Ollama عن الوصول المباشر للإنترنت باستخدام تقسيم الشبكة وقواعد جدار الحماية
3. تطبيق تصفية الخروج الصارمة لتقييد الاتصالات الصادرة من خوادم Ollama
4. مراقبة نقاط نهاية Model Pull API للنشاط المريب
الضوابط التعويضية:
1. نشر قواعد جدار تطبيقات الويب (WAF) للكشف عن أنماط SSRF وحجبها
2. تطبيق التحقق من الطلبات وإدراج عناوين URL البيضاء لعمليات سحب النموذج
3. استخدام الضوابط على مستوى الشبكة (وكيل، جدار حماية) لتقييد قدرة Ollama على الوصول إلى الخدمات الداخلية
4. تفعيل السجلات الشاملة ومراقبة جميع استدعاءات API إلى server/download.go
5. تطبيق تحديد معدل على نقاط نهاية Model Pull API
قواعد الكشف:
1. مراقبة الطلبات التي تحتوي على نطاقات IP الداخلية في معاملات سحب النموذج
2. تنبيه على مراجع localhost/127.0.0.1 في طلبات API
3. تتبع الاتصالات الصادرة غير العادية من عمليات Ollama إلى الخدمات الداخلية
4. مراقبة استخدام بروتوكول file:// أو gopher:// في معاملات API
التصحيح:
1. اتصل بمورد Ollama للحصول على تحديثات أمان أو فكر في حلول بديلة لخدمة نماذج AI
2. قيّم الترقية إلى إصدارات تتجاوز 18.1 عند توفرها
3. إذا لم يكن الترقية ممكنة، احتفظ بالضوابط التعويضية بشكل دائم