Redis is an in-memory data structure store. In redis-server from 7.2.0 until 8.6.3, the unblock client flow does not handle an error return from `processCommandAndResetClient` when re-executing a blocked command. If a blocked client is evicted during this flow, an authenticated attacker can trigger a use-after-free that may lead to remote code execution. This has been patched in version 8.6.3.
Redis versions 7.2.0 through 8.6.3 contain a use-after-free vulnerability in the unblock client flow that can be exploited by authenticated attackers to achieve remote code execution. The vulnerability occurs when a blocked client is evicted during command re-execution, potentially allowing attackers to execute arbitrary code on affected Redis instances. This is a high-severity issue affecting widely-deployed caching and session storage infrastructure across Saudi organizations.
IMMEDIATE ACTIONS:
1. Identify all Redis instances in your environment running versions 7.2.0-8.6.2 using: redis-cli INFO server | grep redis_version
2. Implement network segmentation to restrict Redis access to trusted application servers only
3. Enable Redis ACL (Access Control Lists) to limit authenticated user permissions to minimum required
4. Monitor Redis logs for unusual client blocking/unblocking patterns and memory eviction events
PATCHING GUIDANCE:
1. Upgrade to Redis 8.6.3 or later immediately when available
2. For critical systems unable to patch immediately, implement application-level connection pooling with timeout mechanisms
3. Test patches in non-production environments first
COMPENSATING CONTROLS:
1. Implement strict firewall rules limiting Redis port access (default 6379) to application servers only
2. Disable Redis persistence if not required to reduce attack surface
3. Configure maxmemory-policy to 'noeviction' temporarily to prevent client eviction during patching window
4. Enable Redis AUTH with strong passwords and rotate credentials
5. Implement Redis Sentinel or Cluster for high availability with automatic failover
DETECTION RULES:
1. Alert on multiple CLIENT UNBLOCK commands in short timeframe
2. Monitor for OOM (Out of Memory) errors followed by authentication attempts
3. Track unexpected process crashes or segmentation faults in redis-server
4. Log all CLIENT commands and correlate with memory pressure events
الإجراءات الفورية:
1. حدد جميع خوادم Redis في بيئتك التي تعمل بالإصدارات 7.2.0-8.6.2 باستخدام: redis-cli INFO server | grep redis_version
2. تطبيق تقسيم الشبكة لتقييد وصول Redis إلى خوادم التطبيقات الموثوقة فقط
3. تفعيل Redis ACL (قوائم التحكم في الوصول) لتحديد أذونات المستخدم المصرح إلى الحد الأدنى المطلوب
4. مراقبة سجلات Redis للأنماط غير العادية في حجب/فك حجب العميل وأحداث إزالة الذاكرة
إرشادات التصحيح:
1. الترقية إلى Redis 8.6.3 أو إصدار أحدث فوراً عند توفره
2. بالنسبة للأنظمة الحرجة غير القادرة على التصحيح فوراً، تطبيق تجميع الاتصالات على مستوى التطبيق مع آليات المهلة الزمنية
3. اختبار التصحيحات في بيئات غير الإنتاج أولاً
الضوابط البديلة:
1. تطبيق قواعد جدار الحماية الصارمة لتقييد وصول منفذ Redis (الافتراضي 6379) إلى خوادم التطبيقات فقط
2. تعطيل استمرارية Redis إذا لم تكن مطلوبة لتقليل سطح الهجوم
3. تكوين maxmemory-policy إلى 'noeviction' مؤقتاً لمنع إزالة العميل أثناء نافذة التصحيح
4. تفعيل Redis AUTH بكلمات مرور قوية وتدوير بيانات الاعتماد
5. تطبيق Redis Sentinel أو Cluster للتوفر العالي مع الفشل التلقائي
قواعد الكشف:
1. تنبيه على أوامر CLIENT UNBLOCK متعددة في إطار زمني قصير
2. مراقبة أخطاء OOM (نفاد الذاكرة) متبوعة بمحاولات المصادقة
3. تتبع أعطال العملية غير المتوقعة أو أخطاء الانقسام في redis-server
4. تسجيل جميع أوامر CLIENT والربط بأحداث ضغط الذاكرة