free5GC is an open-source implementation of the 5G core network. In versions 4.2.1 and below of the UDR service, the handler for reading Traffic Influence Subscriptions checks whether the influenceId path segment equals subs-to-notify, but does not return after sending the HTTP 404 response when validation fails. Execution continues and the subscription data is returned alongside the 404 response. An unauthenticated attacker with access to the 5G Service Based Interface can read arbitrary Traffic Influence Subscriptions, including SUPIs/IMSIs, DNNs, S-NSSAIs, and callback URIs, by supplying any value for the influenceId path segment. A patched version was not available at the time of publication.
CVE-2026-40247 is a critical authentication bypass vulnerability in free5GC UDR service (versions 4.2.1 and below) that allows unauthenticated attackers to read arbitrary Traffic Influence Subscriptions including sensitive subscriber identifiers (SUPIs/IMSIs), network slices, and callback URIs. The vulnerability exists due to improper HTTP response handling where the application continues execution after sending a 404 response, leaking subscription data. With no patch available and active exploits likely, this poses immediate risk to 5G core network deployments.
IMMEDIATE ACTIONS:
1. Identify all free5GC UDR service instances in production (versions 4.2.1 and below) across your 5G infrastructure
2. Implement network segmentation: restrict access to UDR Service Based Interface (SBI) to authenticated NF consumers only using firewall rules and mTLS enforcement
3. Enable comprehensive logging and monitoring of all UDR API requests, specifically /nudr-dr/v2/subscription-data/traffic-influence-subscriptions endpoints
4. Deploy Web Application Firewall (WAF) rules to detect and block requests with suspicious influenceId parameters
COMPENSATING CONTROLS (until patch available):
5. Implement strict mutual TLS (mTLS) authentication for all SBI communications - reject any unauthenticated requests at ingress
6. Deploy API gateway with request validation to enforce influenceId format validation and return immediately after 404 responses
7. Implement rate limiting and anomaly detection on subscription data queries
8. Encrypt all subscription data at rest and in transit using AES-256
DETECTION RULES:
- Alert on any HTTP 404 responses from /nudr-dr/v2/subscription-data/traffic-influence-subscriptions followed by 200 responses
- Monitor for requests with influenceId values not matching expected format (should only be 'subs-to-notify')
- Track unauthorized access attempts to UDR endpoints from non-authenticated sources
- Flag bulk subscription data queries or unusual access patterns
PATCHING STRATEGY:
9. Monitor free5GC GitHub repository and official channels for security patches
10. Prepare isolated test environment to validate patches immediately upon release
11. Develop rollback procedures for emergency patching
12. Consider migration to alternative 5G core implementations if patches remain unavailable beyond 30 days
الإجراءات الفورية:
1. تحديد جميع مثيلات خدمة free5GC UDR في الإنتاج (الإصدارات 4.2.1 وأقل) عبر بنية 5G الخاصة بك
2. تنفيذ تقسيم الشبكة: تقييد الوصول إلى واجهة SBI لخدمة UDR للمستهلكين المصرح لهم فقط باستخدام قواعد جدار الحماية وفرض mTLS
3. تفعيل السجلات الشاملة ومراقبة جميع طلبات API لـ UDR، خاصة نقاط نهاية /nudr-dr/v2/subscription-data/traffic-influence-subscriptions
4. نشر قواعد جدار تطبيقات الويب (WAF) للكشف عن طلبات influenceId المريبة وحجبها
الضوابط التعويضية (حتى توفر التصحيح):
5. تنفيذ مصادقة TLS المتبادلة الصارمة (mTLS) لجميع اتصالات SBI - رفض أي طلبات غير مصرح بها عند الدخول
6. نشر بوابة API مع التحقق من الطلبات لفرض التحقق من صيغة influenceId والعودة فوراً بعد استجابات 404
7. تنفيذ تحديد معدل الطلبات والكشف عن الشذوذ في استعلامات بيانات الاشتراك
8. تشفير جميع بيانات الاشتراك في الراحة والنقل باستخدام AES-256
قواعد الكشف:
- تنبيه على أي استجابات HTTP 404 من /nudr-dr/v2/subscription-data/traffic-influence-subscriptions متبوعة باستجابات 200
- مراقبة الطلبات بقيم influenceId غير متطابقة مع الصيغة المتوقعة (يجب أن تكون فقط 'subs-to-notify')
- تتبع محاولات الوصول غير المصرح بها إلى نقاط نهاية UDR من مصادر غير مصرح بها
- وضع علامة على استعلامات بيانات الاشتراك الضخمة أو أنماط الوصول غير المعتادة
استراتيجية التصحيح:
9. مراقبة مستودع free5GC على GitHub والقنوات الرسمية للتصحيحات الأمنية
10. تحضير بيئة اختبار معزولة للتحقق من صحة التصحيحات فوراً عند الإصدار
11. تطوير إجراءات التراجع للتصحيح الطارئ
12. النظر في الهجرة إلى تطبيقات 5G الأساسية البديلة إذا ظلت التصحيحات غير متاحة لأكثر من 30 يوماً