Description
Net::DNS versions before 1.57 for Perl allow memory exhaustion via unbounded recursion in sig_data when re-encoding a message with a misplaced TSIG record.

sig_data signs a message by re-encoding it, and removes TSIG records only from the additional section. A TSIG decoded into the answer or authority section survives that step and is signed again, so encoding re-enters sig_data with no termination condition. Decoding does not reject such a message: a TSIG that is not the last record on the wire raises "misplaced or corrupt TSIG", but the error is caught, reported as a warning, and the record is left in the packet. RFC 8945 section 5.2 requires the message to be dropped.

The recursion is reached only when the decoded TSIG carries an empty MAC, since a MAC recovered from the wire short-circuits the signing step. It is reached only from code that re-encodes a message it decoded, such as a forwarder or a proxy. A decoded message that is never re-encoded is unaffected. Message direction does not matter: a query reaches the same path as a response.

Each cycle re-encodes the whole message, so fewer than 100 bytes on the wire exhaust available memory and terminate the process.
Published: 2026-09-01
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: Memory Exhaustion
Action: Apply Patch
AI Analysis

Impact

Net::DNS versions before 1.57 for Perl contain an unbounded recursion in the sig_data function when a message with a misplaced TSIG record is re‑encoded. The recursion is triggered only when the TSIG carries an empty MAC, causing the function to call itself indefinitely with no termination condition. Each recursive round re‑encodes the entire packet, so even a payload of fewer than 100 bytes can exhaust the host’s available memory and ultimately terminate the process, resulting in a denial‑of‑service. The vulnerability is a classic reliability weakness identified as CWE‑674 and CWE‑835.

Affected Systems

The affected product is the Net::DNS Perl module, version 1.56 and earlier. Systems that use this library in DNS forwarder or proxy roles—such as local DHCP servers, DNS forwarding services, or any application that forwards arbitrary DNS messages—are vulnerable if they re‑encode messages they have previously decoded. Applications that merely decode DNS packets without re‑encoding them, or environments that do not use the Net::DNS module, are not impacted.

Risk and Exploitability

The CVSS score is 7.5, and the EPSS score is less than 1%. The issue is not listed in the CISA KEV catalog. Based on the description, it is inferred that the attacker can trigger the recursion by sending a crafted DNS message with a misplaced TSIG record and an empty MAC to a vulnerable component that re‑encodes the packet. The likely attack vector is an external DNS request, so remote exploitation is possible. Because the flaw requires only a small packet and a simple re‑encoding operation, the impact can be immediate and the attack can be automated, yet the low EPSS score indicates that the probability of fresh exploitation is presently uncertain.

Generated by OpenCVE AI on September 10, 2026 at 04:23 UTC.

Remediation

Vendor Solution

Upgrade to Net-DNS 1.57 or later.


Vendor Workaround

For deployments that are not able to upgrade to Net-DNS 1.57, reject a decoded message before re-encoding it if a TSIG record appears anywhere but the final position of the additional section.


OpenCVE Recommended Actions

  • Upgrade to Net::DNS 1.57 or later
  • If an upgrade is not possible, reject a decoded message before re‑encoding it if a TSIG record appears anywhere but in the final position of the additional section
  • Configure forwarders or proxies to avoid re‑encoding DNS messages that contain TSIG records, or ensure that any TSIG is in the final position before processing
  • Monitor memory usage and logs for signs of recursive re‑encoding or process crashes

Generated by OpenCVE AI on September 10, 2026 at 04:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 09 Sep 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-835
References
Metrics threat_severity

None

threat_severity

Important


Thu, 03 Sep 2026 16:45:00 +0000

Type Values Removed Values Added
First Time appeared Perl
Perl net Dns
Vendors & Products Perl
Perl net Dns

Wed, 02 Sep 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}


Wed, 02 Sep 2026 11:30:00 +0000

Type Values Removed Values Added
References

Tue, 01 Sep 2026 23:30:00 +0000

Type Values Removed Values Added
Description Net::DNS versions before 1.57 for Perl allow memory exhaustion via unbounded recursion in sig_data when re-encoding a message with a misplaced TSIG record. sig_data signs a message by re-encoding it, and removes TSIG records only from the additional section. A TSIG decoded into the answer or authority section survives that step and is signed again, so encoding re-enters sig_data with no termination condition. Decoding does not reject such a message: a TSIG that is not the last record on the wire raises "misplaced or corrupt TSIG", but the error is caught, reported as a warning, and the record is left in the packet. RFC 8945 section 5.2 requires the message to be dropped. The recursion is reached only when the decoded TSIG carries an empty MAC, since a MAC recovered from the wire short-circuits the signing step. It is reached only from code that re-encodes a message it decoded, such as a forwarder or a proxy. A decoded message that is never re-encoded is unaffected. Message direction does not matter: a query reaches the same path as a response. Each cycle re-encodes the whole message, so fewer than 100 bytes on the wire exhaust available memory and terminate the process.
Title Net::DNS versions before 1.57 for Perl allow memory exhaustion via unbounded recursion in sig_data when re-encoding a message with a misplaced TSIG record
Weaknesses CWE-674
References

cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-09-02T19:24:12.656Z

Reserved: 2026-08-27T18:31:50.335Z

Link: CVE-2026-81928

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-09-02T00:18:26.147

Modified: 2026-09-03T16:41:09.297

Link: CVE-2026-81928

cve-icon Redhat

Severity : Important

Publid Date: 2026-09-01T23:14:52Z

Links: CVE-2026-81928 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-10T04:30:06Z

Weaknesses
  • CWE-674

    Uncontrolled Recursion

  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')