hoppscotch is an open source API development ecosystem. Prior to version 2026.2.0, any logged-in user can read, modify or delete another user's personal environment by ID. `user-environments.resolver.ts:82-109`, `updateUserEnvironment` mutation uses `@UseGuards(GqlAuthGuard)` but is missing the `@GqlUser()` decorator entirely. The user's identity is never extracted, so the service receives only the environment ID and performs a `prisma.userEnvironment.update({ where: { id } })` without any ownership filter. `deleteUserEnvironment` does extract the user but the service only uses the UID to check if the target is a global environment. Actual delete query uses WHERE { id } without AND userUid. hoppscotch environments store API keys, auth tokens and secrets used in API requests. An authenticated attacker who obtains another user's environment ID can read their secrets, replace them with malicious values or delete them entirely. The environment ID format is CUID, which limits mass exploitation but insider threat and combined info leak scenarios are realistic. Version 2026.2.0 fixes the issue.
Hoppscotch versions prior to 2026.2.0 contain a critical authorization bypass vulnerability allowing authenticated users to read, modify, or delete other users' API environments containing sensitive credentials. The vulnerability stems from missing user identity validation in the updateUserEnvironment mutation and insufficient ownership checks in deleteUserEnvironment, enabling attackers to access API keys, authentication tokens, and secrets. This poses significant risk to organizations using Hoppscotch for API development and testing, particularly those managing sensitive integrations.
IMMEDIATE ACTIONS:
1. Upgrade Hoppscotch to version 2026.2.0 or later immediately
2. Audit all user environment access logs for unauthorized modifications or deletions
3. Rotate all API keys, authentication tokens, and secrets stored in Hoppscotch environments
4. Review access logs for any suspicious cross-user environment access patterns
PATCHING GUIDANCE:
1. Deploy version 2026.2.0 in development/staging environments first
2. Verify patch includes user identity extraction in updateUserEnvironment mutation
3. Confirm deleteUserEnvironment includes userUid ownership filter in WHERE clause
4. Test that users can only access their own environments
COMPENSATING CONTROLS (if immediate patching delayed):
1. Implement network-level access controls restricting Hoppscotch to authorized users only
2. Deploy API gateway monitoring to detect unusual API key usage patterns
3. Implement environment variable encryption for sensitive credentials outside Hoppscotch
4. Restrict Hoppscotch deployment to isolated development networks
5. Disable environment sharing features if available
DETECTION RULES:
1. Monitor GraphQL mutation logs for updateUserEnvironment calls with mismatched user IDs
2. Alert on deleteUserEnvironment operations where requester UID differs from environment owner
3. Track environment access patterns for cross-user access attempts
4. Monitor for bulk environment ID enumeration attempts (CUID pattern scanning)
الإجراءات الفورية:
1. ترقية Hoppscotch إلى الإصدار 2026.2.0 أو أحدث فوراً
2. تدقيق جميع سجلات الوصول إلى بيئة المستخدم للتعديلات أو الحذف غير المصرح به
3. تدوير جميع مفاتيح API وتوكنات المصادقة والأسرار المخزنة في بيئات Hoppscotch
4. مراجعة سجلات الوصول للكشف عن أنماط الوصول المريبة عبر بيئات المستخدمين
إرشادات التصحيح:
1. نشر الإصدار 2026.2.0 في بيئات التطوير/الاختبار أولاً
2. التحقق من أن التصحيح يتضمن استخراج هوية المستخدم في طفرة updateUserEnvironment
3. تأكيد أن deleteUserEnvironment يتضمن مرشح ملكية userUid في جملة WHERE
4. اختبار أن المستخدمين يمكنهم الوصول فقط إلى بيئاتهم الخاصة
الضوابط البديلة (إذا تأخر التصحيح الفوري):
1. تنفيذ ضوابط الوصول على مستوى الشبكة لتقييد Hoppscotch للمستخدمين المصرح لهم فقط
2. نشر مراقبة بوابة API للكشف عن أنماط استخدام مفاتيح API غير العادية
3. تنفيذ تشفير متغيرات البيئة للبيانات الاعتماد الحساسة خارج Hoppscotch
4. تقييد نشر Hoppscotch على شبكات التطوير المعزولة
5. تعطيل ميزات مشاركة البيئة إن أمكن
قواعد الكشف:
1. مراقبة سجلات طفرة GraphQL لاستدعاءات updateUserEnvironment بمعرفات مستخدمين غير متطابقة
2. التنبيه على عمليات deleteUserEnvironment حيث يختلف معرف المستخدم الطالب عن مالك البيئة
3. تتبع أنماط الوصول إلى البيئة لمحاولات الوصول عبر المستخدمين
4. مراقبة محاولات تعداد معرف البيئة الضخمة (مسح نمط CUID)