Metabase GeoJSON API Local File Inclusion Vulnerability — Metabase contains a local file inclusion vulnerability in the custom map support in the API to read GeoJSON formatted data.
Metabase versions prior to 0.40.3 contain a critical local file inclusion (LFI) vulnerability in the GeoJSON API endpoint that allows unauthenticated attackers to read arbitrary files from the server. With a CVSS score of 9.0 and publicly available exploits, this vulnerability poses an immediate threat to organizations using Metabase for business intelligence and data visualization. Exploitation could lead to exposure of sensitive configuration files, database credentials, and other confidential data.
IMMEDIATE ACTIONS:
1. Identify all Metabase instances in your environment and document their versions
2. Restrict network access to Metabase API endpoints, particularly /api/geojson/* paths, using WAF or network ACLs
3. Implement authentication requirements for all API endpoints if not already enabled
4. Review access logs for suspicious requests to GeoJSON endpoints (look for file path traversal patterns like ../ or encoded variants)
5. Audit exposed files for credential leakage and rotate any compromised credentials
PATCHING GUIDANCE:
1. Upgrade Metabase to version 0.40.3 or later immediately
2. For organizations unable to patch immediately, disable custom map functionality in Metabase settings
3. Test patches in non-production environments before deployment
COMPENSATING CONTROLS (if patching delayed):
1. Deploy Web Application Firewall (WAF) rules to block requests containing path traversal sequences to /api/geojson endpoints
2. Implement IP whitelisting to restrict Metabase API access to known internal networks only
3. Enable comprehensive API logging and monitoring for all GeoJSON requests
4. Implement rate limiting on API endpoints
DETECTION RULES:
1. Monitor for HTTP requests to /api/geojson/* containing: ../, %2e%2e%2f, ..\, %252e%252e%252f
2. Alert on any unauthenticated requests to /api/geojson endpoints
3. Track file access patterns in Metabase logs for /etc/passwd, /etc/shadow, configuration files
4. Monitor for unusual file read operations from Metabase process (strace/auditd)
الإجراءات الفورية:
1. حدد جميع مثيلات Metabase في بيئتك وقم بتوثيق إصداراتها
2. قيد الوصول إلى نقاط نهاية واجهة برمجة التطبيقات Metabase، خاصة مسارات /api/geojson/*، باستخدام WAF أو قوائم التحكم في الوصول
3. طبق متطلبات المصادقة لجميع نقاط نهاية واجهة برمجة التطبيقات إن لم تكن مفعلة بالفعل
4. راجع سجلات الوصول للطلبات المريبة إلى نقاط نهاية GeoJSON (ابحث عن أنماط اجتياز المسار مثل ../ أو المتغيرات المشفرة)
5. تدقيق الملفات المكشوفة لتسرب بيانات الاعتماد وتدوير أي بيانات اعتماد مخترقة
إرشادات التصحيح:
1. قم بترقية Metabase إلى الإصدار 0.40.3 أو أحدث على الفور
2. بالنسبة للمنظمات غير القادرة على التصحيح فوراً، قم بتعطيل وظيفة الخريطة المخصصة في إعدادات Metabase
3. اختبر التصحيحات في بيئات غير الإنتاج قبل النشر
الضوابط البديلة (إذا تأخر التصحيح):
1. نشر قواعد جدار الحماية لتطبيقات الويب (WAF) لحظر الطلبات التي تحتوي على تسلسلات اجتياز المسار إلى نقاط نهاية /api/geojson
2. تطبيق القائمة البيضاء للعناوين لتقييد الوصول إلى واجهة برمجة التطبيقات Metabase للشبكات الداخلية المعروفة فقط
3. تفعيل السجلات الشاملة والمراقبة لجميع طلبات GeoJSON
4. تطبيق تحديد معدل على نقاط نهاية واجهة برمجة التطبيقات
قواعد الكشف:
1. مراقبة طلبات HTTP إلى /api/geojson/* التي تحتوي على: ../, %2e%2e%2f, ..\, %252e%252e%252f
2. تنبيه على أي طلبات غير مصرح بها إلى نقاط نهاية /api/geojson
3. تتبع أنماط الوصول إلى الملفات في سجلات Metabase لـ /etc/passwd و /etc/shadow وملفات التكوين
4. مراقبة عمليات قراءة الملفات غير العادية من عملية Metabase (strace/auditd)