7.5high
CoreDNS Loop Detection Denial of Service Vulnerability
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.22% (higher than 69% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-h75p-j8xm-m278GO-2026-4635
Description
CoreDNS is a DNS server that chains plugins. Prior to version 1.14.2, a denial of service vulnerability exists in CoreDNS's loop detection plugin that allows an attacker to crash the DNS server by sending specially crafted DNS queries. The vulnerability stems from the use of a predictable pseudo-random number generator (PRNG) for generating a secret query name, combined with a fatal error handler that terminates the entire process. This issue has been patched in version 1.14.2.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| coredns coredns | < 1.14.2 | CVE List |
| rhacm2/lighthouse-agent-rhel9 | Not specified Not affected: from 1782924920 before *, from 1780204232 before * | CVE List |
| rhacm2/lighthouse-coredns-rhel9 | Not specified Not affected: from 1782924937 before *, from 1780204249 before *, from 1774086225 before * | CVE List |
| rhcl-1/coredns-rhel9 | Not specified | CVE List |
| openshift4/ose-coredns-rhel9 | Not specified | CVE List |
| github.com/coredns/coredns (Go) | before 1.14.2 | GitHub Advisory Database, Go Vulnerability Database |
| coredns.io coredns | before 1.14.2 | NVD |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| redhat-SADP | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
What each source says
CVE List
CoreDNS is a DNS server that chains plugins. Prior to version 1.14.2, a denial of service vulnerability exists in CoreDNS's loop detection plugin that allows an attacker to crash the DNS server by sending specially crafted DNS queries. The vulnerability stems from the use of a predictable pseudo-random number generator (PRNG) for generating a secret query name, combined with a fatal error handler that terminates the entire process. This issue has been patched in version 1.14.2.
GitHub Advisory Database
Executive Summary
A Denial of Service vulnerability exists in CoreDNS's loop detection plugin that allows an attacker to crash the DNS server by sending specially crafted DNS queries. The vulnerability stems from the use of a predictable pseudo-random number generator (PRNG) for generating a secret query name, combined with a fatal error handler that terminates the entire process.
Technical Details
Vulnerability Description
The CoreDNS loop plugin is designed to detect forwarding loops by performing a self-test during server startup. The plugin generates a random query name (qname) using Go's math/rand package and sends an HINFO query to itself. If the server receives multiple matching queries, it assumes a forwarding loop exists and terminates.
The vulnerability arises from two design flaws:
-
Predictable PRNG Seed: The random number generator is seeded with
time.Now().UnixNano(), making the generated qname predictable if an attacker knows the approximate server start time. -
Fatal Error Handler: When the plugin detects what it believes is a loop (3+ matching HINFO queries), it calls
log.Fatalf()which invokesos.Exit(1), immediately terminating the process without cleanup or recovery.
Affected Code
File: plugin/loop/setup.go
// PRNG seeded with predictable timestamp
var r = rand.New(time.Now().UnixNano())
// Qname generation using two consecutive PRNG calls
func qname(zone string) string {
l1 := strconv.Itoa(r.Int())
l2 := strconv.Itoa(r.Int())
return dnsutil.Join(l1, l2, zone)
}
File: plugin/loop/loop.go
func (l *Loop) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
// ... validation checks ...
if state.Name() == l.qname {
l.inc() // Increment counter
}
if l.seen() > 2 {
// FATAL: Terminates entire process
log.Fatalf("Loop (%s -> %s) detected for zone %q...", ...)
}
// ...
}
File: plugin/pkg/log/log.go
func Fatalf(format string, v ...any) {
logf(fatal, format, v...)
os.Exit(1) // Immediate process termination
}
Exploitation Window
The loop plugin remains active during the following conditions:
| Condition | Window Duration | Attack Feasibility |
|---|---|---|
| Healthy startup | 2 seconds | Requires precise timing |
| Self-test failure (upstream unreachable) | 30 seconds | HIGH - Extended window |
| Network degradation | Variable | Depends on retry behavior |
Attack Scenario
Primary Attack Vector: Network Degradation
When the upstream DNS server is unreachable (network partition, misconfiguration, outage), the loop plugin's self-test fails repeatedly. During this period:
- The loop plugin remains active for up to 30 seconds
- Each self-test attempt generates an HINFO query visible in CoreDNS logs
- An attacker with log access (shared Kubernetes cluster, centralized logging) can observe the qname
- The attacker sends 3 HINFO queries with the observed qname
- The server immediately crashes
┌──────────────────────────────────────────────────────────────────────────┐
│ ATTACK TIMELINE │
├──────────────────────────────────────────────────────────────────────────┤
│ T+0s CoreDNS starts, PRNG seeded with UnixNano() │
│ T+0.5s Self-test HINFO query sent (visible in logs) │
│ T+2s Self-test fails (upstream timeout) │
│ T+3s Retry #1 - counter resets, qname unchanged │
│ T+5s Retry #2 - attacker observes qname in logs │
│ T+5.1s ATTACKER: Send HINFO #1 → counter = 1 │
│ T+5.2s ATTACKER: Send HINFO #2 → counter = 2 │
│ T+5.3s ATTACKER: Send HINFO #3 → counter = 3 → os.Exit(1) │
│ T+5.3s SERVER CRASHES │
└──────────────────────────────────────────────────────────────────────────┘
Impact Assessment
Attack Requirements
| Requirement | Notes |
|---|---|
| Network Access | Must be able to send UDP packets to CoreDNS port |
| Log Access | Required to observe the qname (common in shared clusters) |
| Timing | Extended window during network degradation |
| Authentication | None required |
Real-World Impact
CoreDNS is the default DNS server for Kubernetes clusters. A successful attack would:
- Disruption: All DNS resolution fails within the cluster
- Cascading Failures: Services unable to discover each other
- Restart Loop: If attack persists, CoreDNS enters crash-restart cycle
- Data Plane Impact: Application-level failures across the cluster
References
- CoreDNS GitHub: https://github.com/coredns/coredns
- Loop Plugin Documentation: https://coredns.io/plugins/loop/
- Go math/rand Documentation: https://pkg.go.dev/math/rand
Go Vulnerability Database
CoreDNS Loop Detection Denial of Service Vulnerability in github.com/coredns/coredns
NVD (es)
CoreDNS es un servidor DNS que encadena plugins. Antes de la versión 1.14.2, existe una vulnerabilidad de denegación de servicio en el plugin de detección de bucles de CoreDNS que permite a un atacante colapsar el servidor DNS al enviar consultas DNS especialmente diseñadas. La vulnerabilidad se deriva del uso de un generador de números pseudoaleatorios (PRNG) predecible para generar un nombre de consulta secreto, combinado con un gestor de errores fatal que finaliza el proceso completo. Este problema ha sido parcheado en la versión 1.14.2.
References
| https://github.com/coredns/coredns/security/advisories/GHSA-h75p-j8xm-m278 | advisory, exploit, vendor-advisory, web | |
| https://github.com/coredns/coredns/releases/tag/v1.14.2 | product, release-notes, web | |
| https://access.redhat.com/security/cve/CVE-2026-26018 | vdb-entry | |
| https://bugzilla.redhat.com/show_bug.cgi?id=2445242 | issue-tracking | |
| https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-26018.json | ||
| https://access.redhat.com/errata/RHSA-2026:36873 | vendor-advisory | |
| https://access.redhat.com/errata/RHSA-2026:25127 | vendor-advisory | |
| https://access.redhat.com/errata/RHSA-2026:8151 | vendor-advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-26018 | advisory | |
| https://github.com/coredns/coredns | package | |
Related
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-26018 changed 2026-07-15 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-h75p-j8xm-m278 changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4635 changed 2026-03-23 | CC-BY-4.0 |
| NVD | CVE-2026-26018 changed 2026-07-15 | Public domain |