Allocation of Resources Without Limits or Throttling in the HDF5 weight loading component in Google Keras 3.0.0 through 3.13.0 on all platforms allows a remote attacker to cause a Denial of Service (DoS) through memory exhaustion and a crash of the Python interpreter via a crafted .keras archive containing a valid model.weights.h5 file whose dataset declares an extremely large shape.
CVE-2026-0897 is a Denial of Service vulnerability in Google Keras 3.0.0-3.13.0 affecting HDF5 weight loading. Attackers can craft malicious .keras archive files with oversized dataset declarations to exhaust memory and crash Python interpreters. While no public exploit exists, the vulnerability poses significant risk to organizations using Keras for machine learning model deployment and inference, particularly in cloud and edge computing environments.
1. IMMEDIATE ACTIONS:
- Identify all systems running Keras 3.0.0-3.13.0 across development, testing, and production environments
- Restrict loading of .keras files from untrusted sources until patching is complete
- Implement file integrity verification for model archives before loading
2. PATCHING GUIDANCE:
- Upgrade to Keras 3.13.1 or later immediately
- For TensorFlow users: update to TensorFlow 2.16.0+ which includes patched Keras
- Test patches in non-production environments first
3. COMPENSATING CONTROLS (if immediate patching not possible):
- Implement resource limits: set Python process memory limits using ulimit or container memory constraints
- Deploy model loading in isolated containers with memory caps (e.g., Docker memory limits)
- Validate .keras archive structure before loading using external tools
- Implement timeout mechanisms for model loading operations
- Use sandboxed environments for untrusted model evaluation
4. DETECTION RULES:
- Monitor for Python processes with abnormal memory growth during model loading
- Alert on .keras file loads with dataset shape declarations exceeding 1GB equivalent
- Track failed model loading attempts with memory exhaustion errors
- Log all model file sources and validate against approved repositories
1. الإجراءات الفورية:
- تحديد جميع الأنظمة التي تعمل بـ Keras 3.0.0-3.13.0 في بيئات التطوير والاختبار والإنتاج
- تقييد تحميل ملفات .keras من مصادر غير موثوقة حتى اكتمال التصحيح
- تنفيذ التحقق من سلامة الملفات لأرشيفات النماذج قبل التحميل
2. إرشادات التصحيح:
- الترقية إلى Keras 3.13.1 أو أحدث فوراً
- لمستخدمي TensorFlow: تحديث إلى TensorFlow 2.16.0+ الذي يتضمن Keras المصحح
- اختبار التصحيحات في بيئات غير الإنتاج أولاً
3. الضوابط البديلة (إذا لم يكن التصحيح الفوري ممكناً):
- تنفيذ حدود الموارد: تعيين حدود ذاكرة عملية Python باستخدام ulimit أو قيود ذاكرة الحاوية
- نشر تحميل النموذج في حاويات معزولة بحدود ذاكرة (مثل حدود ذاكرة Docker)
- التحقق من بنية أرشيف .keras قبل التحميل باستخدام أدوات خارجية
- تنفيذ آليات المهلة الزمنية لعمليات تحميل النموذج
- استخدام بيئات معزولة لتقييم النماذج غير الموثوقة
4. قواعد الكشف:
- مراقبة عمليات Python بنمو ذاكرة غير طبيعي أثناء تحميل النموذج
- التنبيه على تحميل ملفات .keras بتصريحات شكل مجموعة بيانات تتجاوز 1GB
- تتبع محاولات تحميل النموذج الفاشلة مع أخطاء استنزاف الذاكرة
- تسجيل جميع مصادر ملفات النموذج والتحقق من المستودعات المعتمدة