DataEase is an open-source data visualization and analytics platform. Versions 2.10.20 and below contain a SQL injection vulnerability in the /datasource/getTableField endpoint. The getTableFiledSql method in CalciteProvider.java incorporates the tableName parameter directly into SQL query strings using String.format without parameterization or sanitization. Although DatasourceServer.java validates that the table name exists in the datasource, an attacker can bypass this by first registering an API datasource with a malicious deTableName, which is then returned by getTables and passes the validation check. An authenticated attacker can execute arbitrary SQL commands, enabling error-based extraction of sensitive database information. This issue has been fixed in version 2.10.21.
DataEase versions 2.10.20 and below contain a critical SQL injection vulnerability in the /datasource/getTableField endpoint that allows authenticated attackers to execute arbitrary SQL commands and extract sensitive database information. The vulnerability exists because the tableName parameter is directly incorporated into SQL queries without proper parameterization, and can be exploited by registering a malicious API datasource that bypasses validation checks. This poses an immediate threat to organizations using DataEase for analytics and data visualization, particularly those handling sensitive business intelligence data.
IMMEDIATE ACTIONS:
1. Identify all DataEase instances in your environment and document their versions
2. Restrict access to DataEase to trusted networks only using firewall rules
3. Implement additional authentication controls (MFA) for DataEase user accounts
4. Monitor /datasource/getTableField endpoint for suspicious activity
5. Review API datasource configurations for any suspicious or unusual entries
PATCHING GUIDANCE:
1. Upgrade DataEase to version 2.10.21 or later immediately when available
2. If immediate patching is not possible, disable the /datasource/getTableField endpoint or restrict it to administrative users only
3. Implement Web Application Firewall (WAF) rules to block SQL injection patterns in the tableName parameter
COMPENSATING CONTROLS:
1. Implement database-level access controls limiting DataEase service account privileges to read-only on non-sensitive tables
2. Enable database query logging and audit all queries executed by DataEase service accounts
3. Implement network segmentation to isolate DataEase from sensitive database systems
4. Deploy intrusion detection systems (IDS) to monitor for SQL injection attack patterns
DETECTION RULES:
1. Monitor for POST requests to /datasource/getTableField with special characters (', ", ;, --, /*) in tableName parameter
2. Alert on database error messages returned in HTTP responses from DataEase endpoints
3. Track creation of new API datasources with unusual or suspicious names containing SQL keywords
4. Monitor database query logs for UNION-based or error-based SQL injection patterns originating from DataEase service account
الإجراءات الفورية:
1. تحديد جميع نسخ DataEase في بيئتك وتوثيق إصداراتها
2. تقييد الوصول إلى DataEase للشبكات الموثوقة فقط باستخدام قواعد جدار الحماية
3. تطبيق عناصر تحكم مصادقة إضافية (MFA) لحسابات مستخدمي DataEase
4. مراقبة نقطة النهاية /datasource/getTableField للنشاط المريب
5. مراجعة تكوينات مصادر بيانات API للبحث عن أي إدخالات مريبة أو غير عادية
إرشادات التصحيح:
1. ترقية DataEase إلى الإصدار 2.10.21 أو أحدث فوراً عند توفره
2. إذا لم يكن التصحيح الفوري ممكناً، قم بتعطيل نقطة النهاية /datasource/getTableField أو قصر الوصول عليها على المستخدمين الإداريين فقط
3. تطبيق قواعد جدار تطبيقات الويب (WAF) لحجب أنماط حقن SQL في معامل tableName
عناصر التحكم البديلة:
1. تطبيق عناصر تحكم الوصول على مستوى قاعدة البيانات لتحديد امتيازات حساب خدمة DataEase للقراءة فقط على الجداول غير الحساسة
2. تفعيل تسجيل استعلامات قاعدة البيانات ومراجعة جميع الاستعلامات المنفذة بواسطة حسابات خدمة DataEase
3. تطبيق تقسيم الشبكة لعزل DataEase عن أنظمة قاعدة البيانات الحساسة
4. نشر أنظمة كشف الاختراق (IDS) لمراقبة أنماط هجمات حقن SQL
قواعد الكشف:
1. مراقبة طلبات POST إلى /datasource/getTableField بأحرف خاصة (', ", ;, --, /*) في معامل tableName
2. التنبيه على رسائل خطأ قاعدة البيانات المرجعة في الاستجابات من نقاط نهاية DataEase
3. تتبع إنشاء مصادر بيانات API جديدة بأسماء غير عادية أو مريبة تحتوي على كلمات مفتاحية SQL
4. مراقبة سجلات استعلامات قاعدة البيانات لأنماط حقن SQL القائمة على UNION أو الأخطاء من حساب خدمة DataEase