RedisTimeSeries is a time-series module for Redis. In all versions before 1.12.14 of RedisTimeSeries, the module does not properly validate serialized values processed through the Redis RESTORE command. An authenticated attacker with permission to execute RESTORE on a server with the RedisTimeSeries module loaded can supply a crafted serialized payload that triggers invalid memory access and may lead to remote code execution. A workaround is to restrict access to the RESTORE command with ACL rules. This has been patched in version 1.12.14.
RedisTimeSeries versions before 1.12.14 contain a critical buffer overflow vulnerability in RESTORE command handling that allows authenticated attackers to achieve remote code execution. The vulnerability affects time-series data processing in Redis deployments across Saudi Arabia's financial and energy sectors. Immediate patching to version 1.12.14 or implementation of strict ACL controls is required to prevent exploitation.
IMMEDIATE ACTIONS:
1. Identify all Redis instances with RedisTimeSeries module loaded using: MODULE LIST command
2. Restrict RESTORE command access immediately via ACL rules: ACL SETUSER default -@dangerous +@all -restore
3. Audit Redis access logs for RESTORE command usage in past 90 days
4. Review service account permissions and disable unnecessary RESTORE access
PATCHING:
1. Upgrade RedisTimeSeries to version 1.12.14 or later
2. Test patches in non-production environment first
3. Plan maintenance window for production upgrades (coordinate with SAMA/NCA if applicable)
4. Verify module loads correctly post-upgrade: MODULE LIST
COMPENSATING CONTROLS (if immediate patching not possible):
1. Implement network segmentation restricting RESTORE command sources
2. Enable Redis command logging and monitoring for RESTORE attempts
3. Deploy WAF/IDS rules to detect malformed RESTORE payloads
4. Implement Redis Sentinel or Cluster with read-only replicas
DETECTION:
1. Monitor Redis logs for RESTORE command execution: grep -i restore /var/log/redis/redis-server.log
2. Alert on any RESTORE commands from unexpected sources
3. Monitor for segmentation faults or crashes in Redis process
4. Track memory access violations in Redis error logs
الإجراءات الفورية:
1. تحديد جميع نوى Redis التي تحتوي على وحدة RedisTimeSeries باستخدام: أمر MODULE LIST
2. تقييد الوصول إلى أمر RESTORE فوراً عبر قواعد ACL: ACL SETUSER default -@dangerous +@all -restore
3. تدقيق سجلات وصول Redis للبحث عن استخدام أمر RESTORE في آخر 90 يوماً
4. مراجعة أذونات حسابات الخدمة وتعطيل الوصول غير الضروري إلى RESTORE
التصحيح:
1. ترقية RedisTimeSeries إلى الإصدار 1.12.14 أو أحدث
2. اختبار التصحيحات في بيئة غير الإنتاج أولاً
3. تخطيط نافذة صيانة لترقيات الإنتاج (التنسيق مع SAMA/NCA إن أمكن)
4. التحقق من تحميل الوحدة بشكل صحيح بعد الترقية: MODULE LIST
الضوابط البديلة (إذا لم يكن التصحيح الفوري ممكناً):
1. تطبيق تقسيم الشبكة لتقييد مصادر أمر RESTORE
2. تفعيل تسجيل وتراقبة أوامر Redis لمحاولات RESTORE
3. نشر قواعد WAF/IDS للكشف عن حمولات RESTORE المشوهة
4. تطبيق Redis Sentinel أو Cluster مع نسخ مكررة للقراءة فقط
الكشف:
1. مراقبة سجلات Redis لتنفيذ أمر RESTORE: grep -i restore /var/log/redis/redis-server.log
2. تنبيه عند أي أوامر RESTORE من مصادر غير متوقعة
3. مراقبة أعطال التقسيم أو توقف عملية Redis
4. تتبع انتهاكات الوصول إلى الذاكرة في سجلات أخطاء Redis