goshs is a SimpleHTTPServer written in Go. From 2.0.0-beta.4 to 2.0.0-beta.5, goshs leaks file-based ACL credentials through its public collaborator feed when the server is deployed without global basic auth. Requests to .goshs-protected folders are logged before authorization is enforced, and the collaborator websocket broadcasts raw request headers, including Authorization. An unauthenticated observer can capture a victim's folder-specific basic-auth header and replay it to read, upload, overwrite, and delete files inside the protected subtree. This vulnerability is fixed in 2.0.0-beta.6.
goshs versions 2.0.0-beta.4 and 2.0.0-beta.5 leak folder-specific basic authentication credentials through an unprotected public collaborator websocket feed. Unauthenticated attackers can capture Authorization headers from request logs and replay them to gain unauthorized access to protected file directories, enabling read, upload, overwrite, and delete operations. This critical vulnerability affects organizations using goshs as a file-sharing solution without global basic authentication enabled.
IMMEDIATE ACTIONS:
1. Identify all goshs deployments in your environment running versions 2.0.0-beta.4 or 2.0.0-beta.5
2. Disable or restrict access to the collaborator websocket endpoint immediately
3. Review websocket logs for any suspicious connection patterns or credential exposure
4. Rotate all folder-specific basic authentication credentials
5. Implement network-level access controls to restrict collaborator feed access
PATCHING:
1. Upgrade to goshs 2.0.0-beta.6 or later immediately
2. Test upgraded instances in isolated environment before production deployment
3. Verify that global basic authentication is enabled post-upgrade
COMPENSATING CONTROLS (if immediate upgrade not possible):
1. Deploy reverse proxy (nginx/Apache) with authentication in front of goshs
2. Implement IP whitelisting for collaborator websocket access
3. Disable collaborator feed feature if not required
4. Monitor Authorization header patterns in access logs for anomalies
5. Implement network segmentation to isolate goshs instances
DETECTION:
1. Monitor for multiple failed authentication attempts followed by successful access
2. Alert on Authorization header values appearing in websocket traffic
3. Track file operations (read/write/delete) from unexpected source IPs
4. Review collaborator websocket connection logs for unauthorized access patterns
الإجراءات الفورية:
1. حدد جميع نشرات goshs في بيئتك التي تعمل بالإصدارات 2.0.0-beta.4 أو 2.0.0-beta.5
2. عطّل أو قيّد الوصول إلى نقطة نهاية websocket للمتعاون فوراً
3. راجع سجلات websocket للبحث عن أي أنماط اتصال مريبة أو تسرب بيانات اعتماد
4. قم بتدوير جميع بيانات اعتماد المصادقة الأساسية الخاصة بالمجلدات
5. طبّق عناصر تحكم الوصول على مستوى الشبكة لتقييد الوصول إلى خلاصة المتعاون
التصحيح:
1. قم بالترقية إلى goshs 2.0.0-beta.6 أو إصدار أحدث فوراً
2. اختبر الحالات المرقاة في بيئة معزولة قبل نشر الإنتاج
3. تحقق من تفعيل المصادقة الأساسية العامة بعد الترقية
عناصر التحكم البديلة (إذا لم يكن الترقية الفورية ممكنة):
1. نشّر خادم وكيل عكسي (nginx/Apache) مع المصادقة أمام goshs
2. طبّق القائمة البيضاء للعناوين IP لوصول websocket للمتعاون
3. عطّل ميزة خلاصة المتعاون إذا لم تكن مطلوبة
4. راقب أنماط رؤوس التفويض في سجلات الوصول للكشف عن الشذوذ
5. طبّق تقسيم الشبكة لعزل حالات goshs
الكشف:
1. راقب محاولات المصادقة الفاشلة المتعددة متبوعة بالوصول الناجح
2. أصدر تنبيهات عند ظهور قيم رؤوس التفويض في حركة websocket
3. تتبع عمليات الملفات (القراءة/الكتابة/الحذف) من عناوين IP غير متوقعة
4. راجع سجلات اتصال websocket للمتعاون للبحث عن أنماط وصول غير مصرح به