Netfoil TTL decrement logic flaw

Severity: medium · Published 2026-11-03

Netfoil, a DNS or caching library written in Go, fails to properly decrement the Time-To-Live (TTL) value on cached records. This allows stale or expired records to be served indefinitely, potentially serving outdated data to applications relying on the cache.

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?
Medium severity, published 3 November 2026.
Which products and versions are affected?
github.com/tinfoil-factory/netfoil (Go) >= 0.3.0, < 0.6.1, SEMVER:introduced=0.3.0,fixed=0.6.1; Tinfoil Factory Netfoil 0.3.0 to 0.6.0, 0.3.0 to before 0.6.1.
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.
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 vulnerability stems from missing TTL decrement logic in the caching mechanism (CWE-672). When cached DNS or similar records are retrieved, their TTL should be reduced to reflect the time elapsed; failure to do so means records remain valid indefinitely even after they should have expired. This affects versions 0.3.0 through 0.6.0 of the library.

Affected products

  • Tinfoil Factory Netfoil 0.3.0 to 0.6.0

References

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