Skip to content

CoreDNS Vulnerable to DoQ Memory Exhaustion via Stream Amplification

High severity GitHub Reviewed Published Jun 6, 2025 in coredns/coredns • Updated Jun 6, 2025

Package

gomod github.com/coredns/coredns (Go)

Affected versions

< 1.21.2

Patched versions

1.21.2

Description

Summary

A Denial of Service (DoS) vulnerability was discovered in the CoreDNS DNS-over-QUIC (DoQ) server implementation. The server previously created a new goroutine for every incoming QUIC stream without imposing any limits on the number of concurrent streams or goroutines. A remote, unauthenticated attacker could open a large number of streams, leading to uncontrolled memory consumption and eventually causing an Out Of Memory (OOM) crash — especially in containerized or memory-constrained environments.

Impact

  • Component: server_quic.go
  • Attack Vector: Remote, network-based
  • Attack Complexity: Low
  • Privileges Required: None
  • User Interaction: None
  • Impact: High availability loss (OOM kill or unresponsiveness)

This issue affects deployments with quic:// enabled in the Corefile. A single attacker can cause the CoreDNS instance to become unresponsive using minimal bandwidth and CPU.

Patches

The patch introduces two key mitigation mechanisms:

  • max_streams: Caps the number of concurrent QUIC streams per connection. Default: 256.
  • worker_pool_size: Introduces a server-wide, bounded worker pool to process incoming streams. Default: 1024.

This eliminates the 1:1 stream-to-goroutine model and ensures that CoreDNS remains resilient under high concurrency. The new configuration options are exposed through the quic Corefile block:

quic {
    max_streams 256
    worker_pool_size 1024
}

These defaults are generous and aligned with typical DNS-over-QUIC client behavior.

Workarounds

If you're unable to upgrade immediately, you can:

  • Disable QUIC support by removing or commenting out the quic:// block in your Corefile
  • Use container runtime resource limits to detect and isolate excessive memory usage
  • Monitor QUIC connection patterns and alert on anomalies

References

Credit

Thanks to @thevilledev for disclovering this vulnerability and contributing a high-quality fix.

For more information

Please consult our security guide for more information regarding our security process.

References

@yongtang yongtang published to coredns/coredns Jun 6, 2025
Published by the National Vulnerability Database Jun 6, 2025
Published to the GitHub Advisory Database Jun 6, 2025
Reviewed Jun 6, 2025
Last updated Jun 6, 2025

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

EPSS score

Weaknesses

CVE ID

CVE-2025-47950

GHSA ID

GHSA-cvx7-x8pj-x2gw

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.