Nextcloud is an open source content collaboration platform. In Nextcloud Server from versions 32.0.0 to before 32.0.2, and 33.0.0 to before 33.0.1, the files_lock app did not properly validate the ownership of files when processing DAV lock and unlock requests. An authenticated user could lock or unlock files belonging to other users by targeting their absolute WebDAV paths. Additionally, lock tokens were disclosed to unauthorized callers in error responses, allowing attackers to remove token-based locks placed by other users' client applications. It is recommended that the Nextcloud Server is upgraded to 32.0.2 or 33.0.1. It is recommended that the Nextcloud Enterprise Server is upgraded to 31.0.14.4 or 32.0.2 or 33.0.1
Nextcloud Server versions 32.0.0-32.0.1 and 33.0.0-33.0.0 contain an authentication bypass vulnerability in the files_lock app that allows authenticated users to lock/unlock files belonging to other users via WebDAV paths. Lock tokens are also disclosed in error responses, enabling attackers to remove locks placed by legitimate client applications. This medium-severity vulnerability (CVSS 6.3) requires immediate patching as it affects file integrity and collaborative work environments.
IMMEDIATE ACTIONS:
1. Identify all Nextcloud Server instances running versions 32.0.0-32.0.1 or 33.0.0-33.0.0
2. Disable the files_lock app if not critical to operations until patching is completed
3. Review WebDAV access logs for suspicious lock/unlock activities targeting files outside user directories
4. Audit file lock history for unauthorized modifications
PATCHING:
1. Upgrade Nextcloud Server to version 32.0.2 or 33.0.1 immediately
2. For Enterprise deployments, upgrade to 31.0.14.4, 32.0.2, or 33.0.1
3. Test patches in non-production environment first
4. Restart Nextcloud services after patching
COMPENSATING CONTROLS (if immediate patching not possible):
1. Restrict WebDAV access to trusted IP ranges via firewall/WAF rules
2. Implement strict file access controls and monitor DAV lock/unlock operations
3. Disable WebDAV if not actively used
4. Monitor authentication logs for unusual lock/unlock patterns
DETECTION:
1. Search logs for LOCK/UNLOCK requests to paths outside user's own directory
2. Alert on multiple lock/unlock operations by single user on different user directories
3. Monitor for error responses containing lock token values
4. Track failed authentication attempts followed by successful lock operations
الإجراءات الفورية:
1. تحديد جميع مثيلات Nextcloud Server التي تعمل بالإصدارات 32.0.0-32.0.1 أو 33.0.0-33.0.0
2. تعطيل تطبيق files_lock إذا لم يكن حرجاً للعمليات حتى يتم إصلاح الثغرة
3. مراجعة سجلات WebDAV للأنشطة المريبة المتعلقة بقفل/فتح الملفات خارج دلائل المستخدم
4. تدقيق سجل قفل الملفات للتعديلات غير المصرح بها
التصحيح:
1. ترقية Nextcloud Server إلى الإصدار 32.0.2 أو 33.0.1 فوراً
2. لنشرات Enterprise، قم بالترقية إلى 31.0.14.4 أو 32.0.2 أو 33.0.1
3. اختبر التصحيحات في بيئة غير الإنتاج أولاً
4. أعد تشغيل خدمات Nextcloud بعد التصحيح
الضوابط البديلة (إذا لم يكن التصحيح الفوري ممكناً):
1. تقييد وصول WebDAV إلى نطاقات IP موثوقة عبر قواعد جدار الحماية/WAF
2. تنفيذ ضوابط وصول صارمة للملفات ومراقبة عمليات قفل/فتح DAV
3. تعطيل WebDAV إذا لم يكن قيد الاستخدام النشط
4. مراقبة سجلات المصادقة للأنماط غير العادية لقفل/فتح
الكشف:
1. البحث في السجلات عن طلبات LOCK/UNLOCK إلى مسارات خارج دليل المستخدم الخاص به
2. التنبيه على عمليات قفل/فتح متعددة من قبل مستخدم واحد على دلائل مستخدمين مختلفة
3. مراقبة رسائل الخطأ التي تحتوي على قيم رموز القفل
4. تتبع محاولات المصادقة الفاشلة متبوعة بعمليات قفل ناجحة