CVE-2026-26018: Github.com/coredns/coredns Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-h75p-j8xm-m278
CVSS 7.5
CWE-337
Published
Advisory Summary

CVE-2026-26018 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-337: Predictable Seed in Pseudo-Random Number Generator (PRNG)) affecting Github.com/coredns/coredns libraries in the Go ecosystem. The issue involves coredns loop detection denial of service vulnerability. Remediation is available by upgrading affected packages to version 1.14.2.

CVE-2026-26018 at a Glance

CVE Identifier CVE-2026-26018
GHSA Identifier GHSA-h75p-j8xm-m278
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-337: Predictable Seed in Pseudo-Random Number Generator (PRNG)
Affected Product Github.com/coredns/coredns
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-26018

To remediate this vulnerability, upgrade all affected Github.com/coredns/coredns dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/coredns/coredns fixed: 1.14.2
Upgrade github.com/coredns/coredns to 1.14.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/coredns/coredns

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-26018, inspect your project dependencies for Github.com/coredns/coredns:

inspect dependencies for github.com/coredns/coredns

Analyze the terminal output to locate any version of Github.com/coredns/coredns in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.14.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-337: Predictable Seed in Pseudo-Random Number Generator (PRNG), where a pseudo-random number generator (prng) is initialized from a predictable seed, such as the process id or system time. In Github.com/coredns/coredns, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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:** 1. **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. 2. **Fatal Error Handler**: When the plugin detects what it believes is a loop (3+ matching HINFO queries), it calls `log.Fatalf()` which invokes `os.Exit(1)`, immediately terminating the process without cleanup or recovery. ### Affected Code **File: `plugin/loop/setup.go`** ```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`** ```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`** ```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: 1. The loop plugin remains active for up to 30 seconds 2. Each self-test attempt generates an HINFO query visible in CoreDNS logs 3. An attacker with log access (shared Kubernetes cluster, centralized logging) can observe the qname 4. The attacker sends 3 HINFO queries with the observed qname 5. 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: 1. **Disruption**: All DNS resolution fails within the cluster 2. **Cascading Failures**: Services unable to discover each other 3. **Restart Loop**: If attack persists, CoreDNS enters crash-restart cycle 4. **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

CVE-2026-26018 Affected Github.com/coredns/coredns Versions

1 component(s)
Fixed Versions:
1.14.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/coredns/coredns
Go
< 1.14.2
1.14.2

References

Frequently Asked Questions

What is CVE-2026-26018?
CVE-2026-26018 is a security vulnerability in Github.com/coredns/coredns involving CoreDNS Loop Detection Denial of Service Vulnerability under CWE-337: Predictable Seed in Pseudo-Random Number Generator (PRNG).
Which Github.com/coredns/coredns versions are affected?
Affected versions include releases prior to 1.14.2 across affected packages: github.com/coredns/coredns.
What version fixes CVE-2026-26018?
Upgrading to 1.14.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/coredns/coredns affected?
Yes, github.com/coredns/coredns is affected in releases prior to 1.14.2. Upgrade your dependency to 1.14.2 or later.
What is the CVSS score of CVE-2026-26018?
CVE-2026-26018 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-26018?
CVE-2026-26018 is classified under CWE-337: Predictable Seed in Pseudo-Random Number Generator (PRNG) (A Pseudo-Random Number Generator (PRNG) is initialized from a predictable seed, such as the process ID or system time.).
How can I check Go dependencies for CVE-2026-26018?
Run the dependency tree command: 'inspect dependencies for github.com/coredns/coredns'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-h75p-j8xm-m278",
  "modified" : "2026-03-06T22:08:22Z",
  "published" : "2026-03-06T22:08:22Z",
  "aliases" : [ "CVE-2026-26018" ],
  "summary" : "CoreDNS Loop Detection Denial of Service Vulnerability",
  "details" : "## Executive Summary\n\nA 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.\n\n---\n## Technical Details\n\n### Vulnerability Description\n\nThe 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.\n\n**The vulnerability arises from two design flaws:**\n\n1. **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.\n\n2. **Fatal Error Handler**: When the plugin detects what it believes is a loop (3+ matching HINFO queries), it calls `log.Fatalf()` which invokes `os.Exit(1)`, immediately terminating the process without cleanup or recovery.\n\n### Affected Code\n\n**File: `plugin/loop/setup.go`**\n```go\n// PRNG seeded with predictable timestamp\nvar r = rand.New(time.Now().UnixNano())\n\n// Qname generation using two consecutive PRNG calls\nfunc qname(zone string) string {\n    l1 := strconv.Itoa(r.Int())\n    l2 := strconv.Itoa(r.Int())\n    return dnsutil.Join(l1, l2, zone)\n}\n```\n\n**File: `plugin/loop/loop.go`**\n```go\nfunc (l *Loop) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {\n    // ... validation checks ...\n    \n    if state.Name() == l.qname {\n        l.inc()  // Increment counter\n    }\n\n    if l.seen() > 2 {\n        // FATAL: Terminates entire process\n        log.Fatalf(\"Loop (%s -> %s) detected for zone %q...\", ...)\n    }\n    \n    // ...\n}\n```\n\n**File: `plugin/pkg/log/log.go`**\n```go\nfunc Fatalf(format string, v ...any) {\n    logf(fatal, format, v...)\n    os.Exit(1)  // Immediate process termination\n}\n```\n\n### Exploitation Window\n\nThe loop plugin remains active during the following conditions:\n\n| Condition | Window Duration | Attack Feasibility |\n|-----------|-----------------|-------------------|\n| Healthy startup | 2 seconds | Requires precise timing |\n| Self-test failure (upstream unreachable) | 30 seconds | **HIGH** - Extended window |\n| Network degradation | Variable | Depends on retry behavior |\n\n### Attack Scenario\n\n**Primary Attack Vector: Network Degradation**\n\nWhen the upstream DNS server is unreachable (network partition, misconfiguration, outage), the loop plugin's self-test fails repeatedly. During this period:\n\n1. The loop plugin remains active for up to 30 seconds\n2. Each self-test attempt generates an HINFO query visible in CoreDNS logs\n3. An attacker with log access (shared Kubernetes cluster, centralized logging) can observe the qname\n4. The attacker sends 3 HINFO queries with the observed qname\n5. The server immediately crashes\n\n```\n┌──────────────────────────────────────────────────────────────────────────┐\n│                         ATTACK TIMELINE                                  │\n├──────────────────────────────────────────────────────────────────────────┤\n│ T+0s     CoreDNS starts, PRNG seeded with UnixNano()                     │\n│ T+0.5s   Self-test HINFO query sent (visible in logs)                    │\n│ T+2s     Self-test fails (upstream timeout)                              │\n│ T+3s     Retry #1 - counter resets, qname unchanged                      │\n│ T+5s     Retry #2 - attacker observes qname in logs                      │\n│ T+5.1s   ATTACKER: Send HINFO #1 → counter = 1                           │\n│ T+5.2s   ATTACKER: Send HINFO #2 → counter = 2                           │\n│ T+5.3s   ATTACKER: Send HINFO #3 → counter = 3 → os.Exit(1)              │\n│ T+5.3s   SERVER CRASHES                                                  │\n└──────────────────────────────────────────────────────────────────────────┘\n```\n\n---\n\n## Impact Assessment\n\n### Attack Requirements\n\n| Requirement | Notes |\n|-------------|-------|\n| Network Access | Must be able to send UDP packets to CoreDNS port |\n| Log Access | Required to observe the qname (common in shared clusters) |\n| Timing | Extended window during network degradation |\n| Authentication | None required |\n\n### Real-World Impact\n\nCoreDNS is the default DNS server for Kubernetes clusters. A successful attack would:\n\n1. **Disruption**: All DNS resolution fails within the cluster\n2. **Cascading Failures**: Services unable to discover each other\n3. **Restart Loop**: If attack persists, CoreDNS enters crash-restart cycle\n4. **Data Plane Impact**: Application-level failures across the cluster\n\n## References\n\n- CoreDNS GitHub: https://github.com/coredns/coredns\n- Loop Plugin Documentation: https://coredns.io/plugins/loop/\n- Go math/rand Documentation: https://pkg.go.dev/math/rand",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coredns/coredns"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.14.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/coredns/coredns/security/advisories/GHSA-h75p-j8xm-m278"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-26018"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/coredns/coredns"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coredns/coredns/releases/tag/v1.14.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-337" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-06T22:08:22Z",
    "nvd_published_at" : "2026-03-06T16:16:10Z"
  }
}