CoreDNS is a DNS server that chains plugins. In versions prior to 1.14.3, the tsig plugin can be bypassed on non-plain-DNS transports (DoT, DoH, DoH3, DoQ, and gRPC) because it trusts the transport writer's TsigStatus() instead of performing verification itself. The DoH and DoH3 writer's TsigStatus() always returns nil, the DoT server does not set TsigSecret on the dns.Server, and the DoQ and gRPC writers also unconditionally return nil. This allows an unauthenticated remote client to bypass TSIG-based authentication and access resources intended to be restricted behind a tsig require all policy. Plain DNS over TCP and UDP are not affected. This issue has been fixed in version 1.14.3.
CoreDNS versions prior to 1.14.3 contain a critical authentication bypass vulnerability in the TSIG plugin affecting encrypted DNS transports (DoT, DoH, DoH3, DoQ, gRPC). Attackers can bypass TSIG authentication to access restricted DNS resources without valid credentials. This vulnerability is particularly severe for organizations relying on TSIG for DNS security in modern encrypted DNS implementations.
IMMEDIATE ACTIONS:
1. Identify all CoreDNS instances in your infrastructure and determine their versions
2. Audit TSIG policies to identify which resources are protected by TSIG authentication
3. Implement network segmentation to restrict DNS query sources to trusted networks only
4. Enable DNS query logging and monitoring for anomalous patterns
PATCHING:
1. Upgrade CoreDNS to version 1.14.3 or later immediately
2. Test patches in non-production environments before deployment
3. Coordinate upgrades with dependent services (Kubernetes clusters, service meshes)
COMPENSATING CONTROLS (if immediate patching not possible):
1. Disable encrypted DNS transports (DoT, DoH, DoH3, DoQ, gRPC) and use only plain DNS with TSIG over TCP/UDP
2. Implement firewall rules to restrict DNS queries to authorized IP ranges
3. Deploy DNS query inspection at network perimeter
4. Use VPN/mTLS for all DNS communications
DETECTION:
1. Monitor for TSIG authentication failures in CoreDNS logs
2. Alert on DNS queries from unexpected sources to TSIG-protected zones
3. Implement IDS signatures for TSIG bypass attempts
4. Track DNS response patterns for unauthorized zone transfers
الإجراءات الفورية:
1. حدد جميع مثيلات CoreDNS في البنية التحتية الخاصة بك وحدد إصداراتها
2. قم بمراجعة سياسات TSIG لتحديد الموارد المحمية بمصادقة TSIG
3. تطبيق تقسيم الشبكة لتقييد مصادر استعلامات DNS إلى الشبكات الموثوقة فقط
4. تفعيل تسجيل استعلامات DNS والمراقبة للأنماط الشاذة
التصحيح:
1. قم بترقية CoreDNS إلى الإصدار 1.14.3 أو أحدث على الفور
2. اختبر التصحيحات في بيئات غير الإنتاج قبل النشر
3. نسق الترقيات مع الخدمات التابعة (مجموعات Kubernetes وشبكات الخدمات)
الضوابط البديلة (إذا لم يكن التصحيح الفوري ممكناً):
1. عطل نقل DNS المشفرة (DoT و DoH و DoH3 و DoQ و gRPC) واستخدم DNS عادي فقط مع TSIG عبر TCP/UDP
2. تطبيق قواعد جدار الحماية لتقييد استعلامات DNS على نطاقات IP المصرح بها
3. نشر فحص استعلامات DNS على محيط الشبكة
4. استخدم VPN/mTLS لجميع اتصالات DNS
الكشف:
1. راقب فشل مصادقة TSIG في سجلات CoreDNS
2. تنبيه على استعلامات DNS من مصادر غير متوقعة إلى مناطق محمية بـ TSIG
3. تطبيق توقيعات IDS لمحاولات تجاوز TSIG
4. تتبع أنماط استجابة DNS للتحويلات المنطقية غير المصرح بها