LiteLLM prior to 1.83.14 allows an authenticated internal_user to create API keys with access to routes that their role does not permit. When generating a key, the allowed_routes field is stored without verifying that the specified routes fall within the user's own permissions. A key created with access to admin-only routes can then be used to reach those routes successfully, bypassing the role-based access controls that would otherwise block the request, enabling full privilege escalation from internal_user to proxy_admin.
LiteLLM versions prior to 1.83.14 contain a critical privilege escalation vulnerability (CVE-2026-47101) allowing authenticated internal users to create API keys with unauthorized administrative access by bypassing role-based access controls. An attacker with internal_user privileges can escalate to proxy_admin level, gaining full system control. This vulnerability poses significant risk to organizations using LiteLLM for API management and authentication, particularly in financial and government sectors where access control is paramount.
IMMEDIATE ACTIONS:
1. Audit all API keys created in LiteLLM instances to identify keys with elevated permissions created by internal_user accounts
2. Revoke any suspicious API keys with admin-only route access created by non-admin users
3. Review access logs for unauthorized administrative API calls using internal_user-created keys
4. Restrict internal_user account creation and review existing internal_user accounts for compromise indicators
PATCHING:
5. Upgrade LiteLLM to version 1.83.14 or later immediately when available
6. If upgrade is not immediately possible, implement compensating controls
COMPENSATING CONTROLS (if patch unavailable):
7. Implement network-level access controls restricting admin-only routes to specific IP ranges
8. Deploy API gateway WAF rules to block requests to admin routes from non-admin API keys
9. Enable comprehensive API audit logging with real-time alerting on admin route access
10. Implement API key rotation policy with 30-day maximum lifetime
11. Disable API key creation permissions for internal_user role at application level
DETECTION:
12. Monitor for API calls to admin-only routes (e.g., /admin/*, /config/*, /keys/manage) from API keys created by internal_user accounts
13. Alert on any role-based access control bypass attempts
14. Track API key creation events and correlate with subsequent elevated privilege usage
الإجراءات الفورية:
1. تدقيق جميع مفاتيح API المنشأة في حالات LiteLLM لتحديد المفاتيح ذات الأذونات المرتفعة التي أنشأتها حسابات internal_user
2. إلغاء أي مفاتيح API مريبة بوصول مسارات خاص بالمسؤول تم إنشاؤها بواسطة مستخدمين غير إداريين
3. مراجعة سجلات الوصول للاتصالات API الإدارية غير المصرح بها باستخدام مفاتيح تم إنشاؤها بواسطة internal_user
4. تقييد إنشاء حسابات internal_user ومراجعة حسابات internal_user الموجودة للكشف عن مؤشرات الاختراق
التصحيح:
5. ترقية LiteLLM إلى الإصدار 1.83.14 أو أحدث فوراً عند توفره
6. إذا لم يكن الترقية ممكنة على الفور، قم بتنفيذ عناصر تحكم تعويضية
عناصر التحكم التعويضية (إذا لم يكن التصحيح متاحاً):
7. تنفيذ عناصر تحكم الوصول على مستوى الشبكة لتقييد المسارات الخاصة بالمسؤول فقط على نطاقات IP محددة
8. نشر قواعد WAF لبوابة API لحظر الطلبات إلى مسارات المسؤول من مفاتيح API غير الإدارية
9. تفعيل تسجيل تدقيق API الشامل مع التنبيهات في الوقت الفعلي على وصول مسار المسؤول
10. تنفيذ سياسة دوران مفتاح API بحد أقصى 30 يوماً
11. تعطيل أذونات إنشاء مفتاح API لدور internal_user على مستوى التطبيق
الكشف:
12. مراقبة استدعاءات API إلى المسارات الخاصة بالمسؤول فقط من مفاتيح API التي أنشأتها حسابات internal_user
13. التنبيه على أي محاولات تجاوز التحكم في الوصول القائمة على الأدوار
14. تتبع أحداث إنشاء مفتاح API والربط مع الاستخدام اللاحق للامتيازات المرتفعة