# CoreDNS v1.13.2

2025-12-10 · [Original release notes](https://github.com/coredns/coredns/releases/tag/v1.13.2) · [Full summary](https://ratatosk.io/en/releases/coredns/v1.13.2)

Security 1 · Breaking changes 4 · Deprecations 1 · Important fixes 5 · Enhancements 6 · Other changes 6

## Security (1)

### Infinite busy loop in `forward` retries fixed

- Affects: setups using the `forward` plugin (Inferred)

An immediate upstream connection error, such as a TCP RST, could leave the `fails` counter unchanged and keep the retry loop running, causing syscall thrashing. `max_connect_attempts` can cap connection attempts per DNS request when set above 0; its default of 0 imposes no cap.

> * plugin/forward: Prevent busy loop on connection err (https://github.com/coredns/coredns/pull/7704)

## Breaking changes (4)

### Synchronized map access in `plugin/pkg/uniq`; `New()` returns `*U`

- Affects: third-party plugins using `plugin/pkg/uniq` with `New()` explicitly declared as `uniq.U`

During reloads, concurrent goroutines accessing the internal map could trigger a data race.

Evidence: “var u uniq.U = uniq.New() // ❌ Won't compile with new version” https://github.com/coredns/coredns/pull/7707

> * core: Fix data race with sync.RWMutex for uniq (https://github.com/coredns/coredns/pull/7707)

### Auto plugin rejects `REGEXP` patterns over 10,000 characters

- Affects: auto plugin configurations with `REGEXP` patterns longer than 10,000 characters (Inferred)

Very large regex patterns in the Corefile could cause CoreDNS to run out of memory; patterns over the limit now return `regexp too large`.

Evidence: “A very large regex for the auto plugin in the Corefile could cause CoreDNS to OOM. This change adds an artificial limit of 10k characters for the regex pattern.” https://github.com/coredns/coredns/pull/7737

> * plugin/auto: Limit regex length (https://github.com/coredns/coredns/pull/7737)

### `forward` rejects `NOERROR` as a `failover` criterion

- Affects: CoreDNS configurations using `failover NOERROR` (Inferred)

Previously, the parser did not recognize `NOERROR` as a failover criterion, so configurations using `failover NOERROR` were not rejected by this check. They now fail during configuration parsing.

Evidence: “Previously the parsing logic in the `forward` plugin setup failed to recognise when `NOERROR` was used as a failover RCODE criteria. The check was in the wrong code branch. This PR fixes it and adds validation tests.” https://github.com/coredns/coredns/pull/7622

> * plugin/forward: Disallow NOERROR in failover (https://github.com/coredns/coredns/pull/7622)

### multisocket `NUM_SOCKETS` capped at 1024

- Affects: multisocket configurations with `NUM_SOCKETS` above 1024 (Inferred)

Previously, an unbounded `NUM_SOCKETS` value could make CoreDNS create excessive listeners and run out of memory at startup.

Evidence: “+* **NUM_SOCKETS** - the number of servers that will listen on one port. Default value is equal to GOMAXPROCS. Maximum value is 1024.” https://github.com/coredns/coredns/pull/7615

> * plugin/multisocket: Cap num sockets to prevent OOM (https://github.com/coredns/coredns/pull/7615)

## Deprecations (1)

### Correctly spelled `MaximumDefaultTTL` constant added

- Affects: Go code using the dnsutil package’s exported TTL constant (Inferred)
- Removed in: not stated

The old `MaximumDefaulTTL` name remains available as a deprecated alias with the same value, `1 * time.Hour`. The cache package now refers to `MaximumDefaultTTL`.

> * plugin/cache: Correct spelling of MaximumDefaultTTL in cache and dnsutil packages (https://github.com/coredns/coredns/pull/7678)

## Important fixes (5)

### Dnstap flushing and socket redial fixed

- Affects: setups using the Dnstap plugin

When its queue stayed full, repeated timer resets prevented flushing and delayed reports of dropped messages; if its output socket was unreachable at startup while CoreDNS stayed busy, it could go hours without redialing. It now runs flush, error-reporting, and redial actions every second while the queue stays full, and a missing encoder returns an error for each failed message to trigger a socket redial.

> * plugin/dnstap: Better error handling (redial & logging) when Dnstap is busy (https://github.com/coredns/coredns/pull/7619)

### DNS-over-QUIC reload crash fixed

- Affects: DNS-over-QUIC setups

During reloads that reuse a socket and leave `s.quicListener` nil, the server could crash and panic. It now initializes `s.quicListener` in `ServePacket` when nil.

> * core: Prevent QUIC reload panic by lazily initializing the listener (https://github.com/coredns/coredns/pull/7680)

### Cache background-prefetch metadata race fixed

- Affects: setups using the cache plugin's background prefetch

When other plugins in the chain concurrently accessed or wrote request-scoped metadata during background prefetch, reads could race with writes and cause a fatal concurrent-map crash. Prefetch now uses a fresh metadata context, isolating its writes from reads of the original request's metadata map.

> * plugin/cache: Isolate metadata in prefetch goroutine (https://github.com/coredns/coredns/pull/7631)

### CNAME `RegexMatch` rules now precompile regexes at setup

- Affects: CNAME rewrite rules using the `RegexMatch` match type (Inferred)

Previously, an invalid pattern could panic when its rule was first invoked; it now returns a setup error. Valid patterns are no longer recompiled on each request, improving plugin performance.

> * plugin/rewrite: Pre-compile CNAME rewrite regexp (https://github.com/coredns/coredns/pull/7697)

### Secondary plugin reload goroutine leak fixed

- Affects: secondary plugin zones with `TransferFrom` configured (Inferred)

When the secondary plugin reloaded for a zone with `TransferFrom` configured, its update goroutine was not closed and could leak. During reload shutdown, the goroutine now stops its tickers and returns.

> * plugin/secondary: Fix reload causing secondary plugin goroutine to leak (https://github.com/coredns/coredns/pull/7694)

## Enhancements (6)

- DNS over HTTP/3 server support (To use: Configure an `https3://` server address to use DoH3.)
- Per-destination TLS server names for the `forward` plugin (To use: Specify the expected server name in each TLS destination URI, and omit `tls_servername` when using per-destination SNI.)
- Per-request upstream connection-attempt limit in the `forward` plugin (To use: Set `max_connect_attempts` to a positive value to enable a per-request cap; its default of 0 means no cap.)
- ASN database and metadata support in the `geoip` plugin (To use: An ASN `.mmdb` database must be configured.)
- GeoIP City metadata gains subdivision codes
- Nomad plugin gains service filtering (To use: Configure the Nomad plugin’s `filter` setting; it accepts Nomad filtering syntax and defaults to `""`.)

## Other changes (6)

- Proxy pool `Yield` avoids timer allocation
- CoreDNS replacer avoids an allocation by pooling byte-slice pointers
- Test code uses `reflect.TypeFor` for known types
- Cache response copying avoids redundant slice allocations
- `file` plugin label traversal optimized
- Kubernetes plugin includes underlying errors in failed-watch logs

---

Summaries are produced by AI, so they can be wrong, and they are provided without warranty.
