GO-2026-6805: CoreDNS `k8s_external` headless AXFR can emit an empty transfer batch that panics the `transfer` plugin
CoreDNS is a DNS server written in Go. From 1.9.4 until 1.14.5, a network DNS client allowed to request AXFR for a CoreDNS zone can trigger a panic when CoreDNS is configured with k8sexternal headless-service zone transfers and Kubernetes contains a headless service endpoint with no declared ports; plugin/kubernetes/object/endpoint.go creates Port: -1, plugin/k8sexternal/msgtodns.go skips that service, plugin/k8sexternal/transfer.go sends an empty []dns.RR batch, and plugin/transfer/transfer.go indexes records[0] without checking the batch is non-empty. This issue is fixed in version 1.14.5.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
CoreDNSto a version that resolves this vulnerability.Fixed in 1.14.5
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Affected deployments run CoreDNS versions from 1.9.4 through before 1.14.5, use k8s_external headless-service zone transfers, and have a Kubernetes headless-service endpoint with no declared ports.
What access does an attacker need?
An attacker needs network access to act as a DNS client and must be allowed to request an AXFR transfer for a CoreDNS zone. No authentication or user interaction is described as necessary.
What can be done before upgrading?
Restrict AXFR requests so untrusted network clients cannot request zone transfers. Also avoid the triggering configuration by removing or correcting headless-service endpoints that have no declared ports, or by disabling the affected k8s_external headless-service transfer use case.
How can I determine whether my environment is at risk?
Check whether CoreDNS is running a version from 1.9.4 through before 1.14.5, whether k8s_external is configured for headless-service zone transfers, and whether Kubernetes contains any headless-service endpoints with no declared ports.