Signal K Server is a server application that runs on a central hub in a boat. Versions prior to 2.19.0 of the appstore interface allow administrators to install npm packages through a REST API endpoint. While the endpoint validates that the package name exists in the npm registry as a known plugin or webapp, the version parameter accepts arbitrary npm version specifiers including URLs. npm supports installing packages from git repositories, GitHub shorthand syntax, and HTTP/HTTPS URLs pointing to tarballs. When npm installs a package, it can automatically execute any `postinstall` script defined in `package.json`, enabling arbitrary code execution. The vulnerability exists because npm's version specifier syntax is extremely flexible, and the SignalK code passes the version parameter directly to npm without sanitization. An attacker with admin access can install a package from an attacker-controlled source containing a malicious `postinstall` script. Version 2.19.0 contains a patch for the issue.
Signal K Server versions prior to 2.19.0 contain a critical code injection vulnerability in the appstore interface that allows authenticated administrators to execute arbitrary code by installing malicious npm packages through unsanitized version parameters. The vulnerability leverages npm's flexible version specifier syntax and postinstall script execution capabilities. With an available exploit and widespread use in maritime IoT systems, immediate patching is essential for all affected deployments.
IMMEDIATE ACTIONS:
1. Identify all Signal K Server instances in your environment and document current versions
2. Restrict admin access to the appstore interface to only trusted personnel
3. Implement network segmentation to limit access to Signal K Server REST API endpoints
4. Enable audit logging for all appstore package installation activities
PATCHING:
1. Upgrade all Signal K Server instances to version 2.19.0 or later immediately
2. Verify patch installation by checking version output: signalk-server --version
3. Restart all Signal K Server services after patching
4. Test functionality in non-production environment first if possible
COMPENSATING CONTROLS (if immediate patching not possible):
1. Disable the appstore interface entirely if not required for operations
2. Implement firewall rules to restrict access to appstore REST API endpoints to specific trusted IPs
3. Require multi-factor authentication for admin accounts
4. Monitor npm package installation attempts via system logs and process monitoring
DETECTION:
1. Monitor for suspicious npm install commands with unusual version specifiers (containing http://, https://, git://, github:)
2. Alert on any postinstall script execution from Signal K Server processes
3. Monitor outbound connections from Signal K Server to external repositories
4. Review audit logs for appstore API calls with non-standard version parameters
الإجراءات الفورية:
1. حدد جميع مثيلات Signal K Server في بيئتك وقثق الإصدارات الحالية
2. قيد الوصول الإداري إلى واجهة متجر التطبيقات للموظفين الموثوقين فقط
3. طبق تقسيم الشبكة لتحديد الوصول إلى نقاط نهاية REST API لخادم Signal K
4. فعّل تسجيل التدقيق لجميع أنشطة تثبيت حزم متجر التطبيقات
التصحيح:
1. ترقية جميع مثيلات Signal K Server إلى الإصدار 2.19.0 أو أحدث فوراً
2. تحقق من تثبيت التصحيح بفحص إخراج الإصدار: signalk-server --version
3. أعد تشغيل جميع خدمات Signal K Server بعد التصحيح
4. اختبر الوظائف في بيئة غير الإنتاج أولاً إن أمكن
الضوابط البديلة (إذا لم يكن التصحيح الفوري ممكناً):
1. عطّل واجهة متجر التطبيقات بالكامل إذا لم تكن مطلوبة للعمليات
2. طبق قواعد جدار الحماية لتقييد الوصول إلى نقاط نهاية REST API لمتجر التطبيقات إلى عناوين IP موثوقة محددة
3. اطلب المصادقة متعددة العوامل لحسابات المسؤول
4. راقب محاولات تثبيت حزم npm عبر سجلات النظام ومراقبة العمليات
الكشف:
1. راقب أوامر npm install المريبة مع محددات إصدار غير عادية (تحتوي على http://، https://، git://، github:)
2. أصدر تنبيهات لأي تنفيذ سكريبت postinstall من عمليات Signal K Server
3. راقب الاتصالات الصادرة من Signal K Server إلى المستودعات الخارجية
4. راجع سجلات التدقيق لاستدعاءات API لمتجر التطبيقات مع معاملات إصدار غير قياسية