Netfoil TTL not decremented in DNS responses

Severity: info · Published 2026-11-05

Netfoil is a DNS caching and proxying library for Go applications. Due to a bug, DNS records' time-to-live (TTL) values are not properly decremented as time passes, causing stale or expired records to continue being served to clients instead of being refreshed from authoritative sources.

Technologies: github.com/tinfoil-factory/netfoil (Go), Tinfoil Factory Netfoil. Vendors: Go, Tinfoil Factory.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Informational severity, published 5 November 2026.
Which products and versions are affected?
github.com/tinfoil-factory/netfoil (Go) SEMVER:introduced=0.3.0,fixed=0.6.1; Tinfoil Factory Netfoil 0.3.0 to 0.6.0.
Is there a fix for This vulnerability?
Yes. github.com/tinfoil-factory/netfoil (Go): upgrade to 0.6.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is This vulnerability attacked?
It is attacked over the network, in a software library.
Am I affected?
Check whether you run github.com/tinfoil-factory/netfoil (Go) or Tinfoil Factory Netfoil at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • github.com/tinfoil-factory/netfoil (Go): upgrade to 0.6.1 or later
    go get github.com/tinfoil-factory/netfoil@v0.6.1

Technical details

The rewriteTTLs function in the DNS proxy component fails to modify TTL values in cached DNS responses because it iterates over a cloned slice by value rather than by reference, leaving the original cached records unchanged. This causes DNS responses to be served indefinitely without TTL expiration, potentially serving stale address records if upstream changes occur.

Affected products

  • tinfoil-factory netfoil 0.3.0 to 0.6.0

Identifiers

  • GHSA-9ppr-wfw9-xvr2
  • GO-2026-6906

Timeline

  • 2026-06-25: disclosed
  • 2026-11-05: patched

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.