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

Summary

CVECVE-2026-81928
StatePUBLISHED
AssignerCPANSec
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-09-02 00:18:26 UTC
Updated2026-09-02 00:18:26 UTC
DescriptionNet::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.

Risk And Classification

Problem Types: CWE-674 | CWE-674 CWE-674 Uncontrolled Recursion

References

ReferenceSourceLinkTags
metacpan.org/release/NLNETLABS/Net-DNS-1.56/source/lib/Net/DNS/RR/TSIG.pm 9b29abf9-4ab0-4765-b253-1875cd9b441e metacpan.org
rt.cpan.org/Ticket/Display.html 9b29abf9-4ab0-4765-b253-1875cd9b441e rt.cpan.org
metacpan.org/release/NLNETLABS/Net-DNS-1.56/source/lib/Net/DNS/RR/TSIG.pm 9b29abf9-4ab0-4765-b253-1875cd9b441e metacpan.org
metacpan.org/release/NLNETLABS/Net-DNS-1.57/changes 9b29abf9-4ab0-4765-b253-1875cd9b441e metacpan.org
datatracker.ietf.org/doc/html/rfc8945 9b29abf9-4ab0-4765-b253-1875cd9b441e datatracker.ietf.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Naseeb Dangi and Xiang Li from AOSP Lab @ Nankai University (en)

Additional Advisory Data

Solutions

CNA: Upgrade to Net-DNS 1.57 or later.

Workarounds

CNA: 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.

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report