Net::DNS is the DNS library most Perl code uses when it needs to send its own queries rather than go through the system resolver. Up to version 1.57 it drew the 16-bit query ID that matches an answer to its question from Perl’s built-in rand(). That generator is not cryptographic: an attacker who can watch a short run of a program’s query IDs can recover the generator’s state, predict the next IDs, and inject forged DNS answers the program will accept. Upgrade Net::DNS to 1.58 or later; where your distribution has no fixed package yet, point the host at a local validating resolver and treat DNSSEC as the backstop. Programs that resolve names through getaddrinfo() and the system stub resolver, which is most of them, do not use this code and are not affected.
CVE-2026-101340 at a glance.
| Component | Net::DNS, the Perl DNS resolver library maintained by NLnet Labs: Debian and Ubuntu libnet-dns-perl, Red Hat and SUSE perl-Net-DNS, Alpine perl-net-dns, and anything installed from CPAN |
| Affected versions | Every release up to and including 1.57 (the record lists 0.02 onwards). The duplicate-answer cache added in 1.57 does not help |
| Fixed in | Net::DNS 1.58, released 20 November 2026 (the Changes file: “Query ID predictable from a short sequence of observations”, rt.cpan.org #183247). Distribution packages below: Debian sid has 1.58-1, no stable distribution had a fix on 30 November 2026 |
| Severity | NLnet Labs CVSS 4.0 9.1 Critical (AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N); NVD has not scored it. Red Hat Important, 7.4 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N, draft); SUSE important, 7.4. CWE-338, cryptographically weak PRNG. The 9.1 and the 7.4 differ only on attack complexity: the attacker has to observe the victim’s queries first |
| Exploited in the wild | Not on CISA’s Known Exploited Vulnerabilities list as of 30 November 2026; CISA’s SSVC says no known exploitation, not automatable, total technical impact. EPSS: no score yet on 30 November 2026 |
| Who is exposed | Perl programs that build and send their own DNS queries with Net::DNS, such as SpamAssassin’s DNS-blocklist checks, mail and monitoring tooling, and in-house scripts, when their queries travel over a network an attacker can observe and answer on. A forged answer means the program trusts whatever address or record the attacker chose. Code that relies on the system stub resolver, and Net::DNS instances talking only to a trusted validating resolver on the same host, are not usefully attackable |
| Published | CVE record 20 November 2026 (reported 8 November, patch shared 17 November, 1.58 released 20 November; credit Xiang Li, Aichun Huang and Zheli Liu, AOSP Lab at Nankai University); this page built 30 November 2026, last updated 30 November 2026 |
What it is
A DNS client has one small defence against an answer it did not ask for: the 16-bit ID it put in the question, which the answer must echo, together with the source port it sent from. Kaminsky’s 2008 work made every serious resolver randomise both with a proper generator. Net::DNS randomised the ID with Perl’s rand(), which is a plain pseudo-random generator with a small internal state. The CVE record’s description is exact: an attacker who can observe the sequence of query IDs can expose the generator’s internal state and predict the IDs before they are sent. From there the attack is the classic one: send answers carrying the predicted ID to the victim’s port and they are accepted as genuine, for whatever name the attacker wants to poison.
Two details from the record matter for judging exposure. The attacker needs to see a short run of the victim’s IDs first, which is why Red Hat and SUSE score the attack complexity high and arrive at 7.4 against NLnet Labs’ 9.1; on a shared segment, a compromised resolver path, or any network where the queries are visible, that condition is met. And the deduplication cache introduced in 1.57, which drops repeated answers, “has no impact on the feasibility of this attack”. The fix in 1.58 changes where the IDs come from; the vendor advisory that describes the replacement generator refused automated readers when this page was built, so this page does not say which source it is, only that NLnet Labs released it on 20 November after the reporters verified the patch.
Red Hat’s statement is a useful frame: on its systems perl-Net-DNS is a shared library module, not the system resolver, so the exposure is exactly the set of Perl programs that use it to talk to a resolver across a network. The best known of those is SpamAssassin, which uses Net::DNS for its DNS-based blocklist and allowlist lookups; a poisoned answer there changes whether mail is accepted. Anything else on the box that imports Net::DNS is in the same position.
Who is affected on Linux
Each row is what the distribution’s own security tracker said on 30 November 2026; the link in the row is the tracker page, which will be newer than this one. Every stable distribution still shipped an affected version on that date.
| Distribution | Status | Fixed package |
|---|---|---|
| Debian bookworm, trixie, forky, sid | Vulnerable on every suite but sid | bookworm libnet-dns-perl 1.36-1 (and 1.36-1+deb12u1), trixie 1.57-0+deb13u1 (security 1.56-0+deb13u1), forky 1.57-1 all vulnerable; sid 1.58-1 fixed; no DSA or DLA issued |
| Ubuntu 20.04 to 26.04 | Tracker unreachable on 30 November 2026 | Ubuntu’s CVE page refused automated readers when this page was built, so no priority or libnet-dns-perl status is reproduced here; Ubuntu’s package is Debian’s, so expect the same picture |
| RHEL 7, 8, 9 (and rebuilds) | Important (7.4), perl-Net-DNS affected, no erratum | RHEL 7, 8 and 9 all “Affected” with no fixed build on 30 November 2026; RHEL 6 out of support. Red Hat’s mitigation is to point Net::DNS at a trusted DNSSEC-validating resolver on 127.0.0.1 or ::1, or to remove perl-Net-DNS where nothing needs it |
| SUSE SLE 12 SP5, 15 SP6, 15 SP7, openSUSE Leap 15.x | important, pending | perl-Net-DNS “Affected” across the supported products, no fixed build listed (SUSE bug 1291268) |
| Fedora, Arch, Alpine | Not consulted | Alpine’s tracker refused automated readers; Fedora and Arch not read for this page |
CPAN installs, local::lib, container images, vendored copies | Affected below 1.58 | Net::DNS 1.58 from CPAN; look for copies outside the package manager |
How to check
Three questions: which Net::DNS is installed and where, what on the host uses it, and which resolver its queries go to. The first command answers the first two for the packaged copy; the grep finds the programs, and the last block tells you whether those programs’ queries leave the host.
# installed version(s): anything at or below 1.57 is affected
perl -MNet::DNS -e 'print "$Net::DNS::VERSION from $INC{q{Net/DNS.pm}}\n"' 2>/dev/null || echo "Net::DNS not installed for system perl"
dpkg -l libnet-dns-perl 2>/dev/null | grep '^ii' # Debian / Ubuntu
rpm -q perl-Net-DNS 2>/dev/null # RHEL family / SUSE
apk info -v perl-net-dns 2>/dev/null # Alpine
# copies outside the package manager (CPAN, local::lib, containers)
find / -path /proc -prune -o -path '*/Net/DNS.pm' -print 2>/dev/null | xargs -r grep -H '^our \$VERSION\|^\$VERSION' 2>/dev/null
# what uses it
grep -rlE '^\s*use Net::DNS' /usr/share/perl5 /usr/lib*/perl5 /usr/local /opt /etc /srv 2>/dev/null | head -20
rpm -q --whatrequires perl-Net-DNS 2>/dev/null; apt-cache rdepends --installed libnet-dns-perl 2>/dev/null
# where its queries go: a remote resolver is the exposed case, a local validating one is the safe case
grep -E '^nameserver' /etc/resolv.conf
resolvectl status 2>/dev/null | grep -E 'DNSSEC|DNS Servers'A version of 1.58 or later, or no Net::DNS on the host, means you are done. A 1.57-or-older copy with no program using it is a patching chore, not an exposure. A copy that SpamAssassin, a mail gateway or a monitoring script uses, with resolv.conf pointing at a resolver across the network, is the case the CVE describes, and the resolver line is also the thing you can change today.
How to fix it
Install 1.58 and restart the long-running programs that loaded the old module; a daemon such as spamd keeps the module it started with. On 30 November only Debian sid had a package, so on most hosts the choice is CPAN or the mitigation.
# Debian sid (and the others once their trackers show a fix) / Ubuntu
apt update && apt install --only-upgrade libnet-dns-perl
# RHEL family and SUSE: no erratum on 30 November; watch dnf / zypper
dnf update perl-Net-DNS
# CPAN, where the package manager has nothing yet (installs under the system perl)
cpanm Net::DNS@1.58
perl -MNet::DNS -e 'print "$Net::DNS::VERSION\n"' # must print 1.58 or later
systemctl restart spamd 2>/dev/null # and any other daemon that loaded the old copyIf you cannot upgrade yet, take away the attacker’s vantage point rather than the library: run a validating resolver on the host (Unbound, or systemd-resolved with DNSSEC on) and point resolv.conf at it, which is Red Hat’s mitigation. A forged answer then has to beat DNSSEC validation, and the queries Net::DNS sends never cross a network where they can be watched. Do not rely on the 1.57 deduplication cache, which the record says changes nothing, and do not assume firewalling the host’s DNS port helps: the forged packets arrive as answers to queries the host itself sent.
# systemd-resolved: validate locally and send every program's queries through 127.0.0.53
mkdir -p /etc/systemd/resolved.conf.d
printf '[Resolve]\nDNSSEC=yes\n' > /etc/systemd/resolved.conf.d/dnssec.conf
systemctl restart systemd-resolved
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
resolvectl status | grep -E 'DNSSEC' # must show yesSources
- CVE-2026-101340 at CVE.org — the NLnet Labs CNA record (20 November 2026): the
rand()description, CVSS 4.0 9.1, CWE-338, the timeline and the credits - NLnet Labs advisory — the vendor’s text; it refused automated readers on 30 November 2026, so this page is built from the record and the Changes file
- Net::DNS Changes on MetaCPAN — the 1.58 entry of 20 November 2026 naming the CVE and rt.cpan.org #183247
- NVD entry — Received; only the CNA’s CVSS 4.0 so far
- Distribution trackers: Debian · Ubuntu (unreachable on 30 November) · Red Hat (Important, 7.4, the local-resolver mitigation) · SUSE
- EPSS — no score for this CVE on 30 November 2026
Related reading
- How a Name Is Actually Resolved on a Linux Box — why most programs never touch Net::DNS, and what the stub resolver does instead
- DNS, All the Way Down: From getaddrinfo to an Answer — query IDs, source ports and why randomising both is the whole defence against forged answers
- CVE-2015-5477: ISC BIND named crashes on a crafted TKEY query — the other DNS advisory on this site, on the server side
- Hardening a Public-Facing Service Beyond the Basics — running a local validating resolver is one of the cheap defences that helps with more than this bug
- The Half of Patching That Happens After the Patch is Installed — a daemon that loaded the old module keeps it until it is restarted
This advisory page was assembled from the primary sources listed above on 30 November 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.

