NocoDB is software for building databases as spreadsheets. Prior to version 0.301.3, user-controlled content in comments and rich text cells was rendered via v-html without sanitization, enabling stored XSS. This issue has been patched in version 0.301.3.
NocoDB versions prior to 0.301.3 contain a stored cross-site scripting (XSS) vulnerability in comments and rich text cells due to unsanitized rendering via v-html. This allows authenticated attackers to inject malicious scripts that execute in other users' browsers, potentially leading to session hijacking, credential theft, or unauthorized data access. The vulnerability affects organizations using NocoDB for database management and collaborative spreadsheet operations.
Immediate Actions:
1. Identify all NocoDB instances in your environment and document their versions
2. Restrict access to NocoDB to trusted networks only using firewall rules
3. Disable or remove NocoDB instances not critical to operations
4. Implement input validation and output encoding at the application layer
Patching Guidance:
1. Upgrade to NocoDB version 0.301.3 or later immediately
2. Test the upgrade in a non-production environment first
3. Verify all comments and rich text cells render safely after patching
4. Review recent comment and cell modification logs for suspicious content
Compensating Controls (if upgrade delayed):
1. Implement Web Application Firewall (WAF) rules to detect and block XSS payloads in POST requests
2. Enable Content Security Policy (CSP) headers to restrict script execution
3. Enforce strict input validation on all comment and cell submissions
4. Monitor and audit all user activities in NocoDB, particularly comment creation
Detection Rules:
1. Monitor for HTML/JavaScript patterns in comment fields: <script>, javascript:, onerror=, onload=
2. Alert on unusual comment modifications by service accounts or batch operations
3. Track failed sanitization attempts in application logs
4. Monitor for DOM-based XSS indicators in browser console errors
الإجراءات الفورية:
1. حدد جميع مثيلات NocoDB في بيئتك وتوثيق إصداراتها
2. قيد الوصول إلى NocoDB للشبكات الموثوقة فقط باستخدام قواعد جدار الحماية
3. عطّل أو أزل مثيلات NocoDB غير الحرجة للعمليات
4. طبّق التحقق من الإدخال وترميز الإخراج على مستوى التطبيق
إرشادات التصحيح:
1. قم بالترقية إلى إصدار NocoDB 0.301.3 أو أحدث فوراً
2. اختبر الترقية في بيئة غير الإنتاج أولاً
3. تحقق من أن جميع التعليقات وخلايا النصوص الغنية تُعرض بأمان بعد التصحيح
4. راجع سجلات التعديلات الأخيرة للتعليقات والخلايا للبحث عن محتوى مريب
الضوابط البديلة (إذا تأخر التحديث):
1. طبّق قواعد جدار تطبيقات الويب (WAF) للكشف عن حقن XSS وحجبها
2. فعّل رؤوس سياسة أمان المحتوى (CSP) لتقييد تنفيذ النصوص البرمجية
3. فرض التحقق الصارم من الإدخال على جميع تقديمات التعليقات والخلايا
4. راقب وتدقيق جميع أنشطة المستخدمين في NocoDB، خاصة إنشاء التعليقات
قواعد الكشف:
1. راقب أنماط HTML/JavaScript في حقول التعليقات: <script>، javascript:، onerror=، onload=
2. أصدر تنبيهات لتعديلات التعليقات غير العادية بواسطة حسابات الخدمة أو العمليات الجماعية
3. تتبع محاولات التنظيف الفاشلة في سجلات التطبيق
4. راقب مؤشرات XSS القائمة على DOM في أخطاء وحدة تحكم المتصفح