CVE-2026-81928
largeUnbounded recursion DoS in Net::DNS (Perl) via misplaced TSIG on re-encode
Net::DNS versions before 1.57 for Perl contain an unbounded recursion (CWE-674) in its sig_data routine that can exhaust memory and terminate the host process. An attacker triggers it by sending a DNS message with a TSIG record misplaced in the answer or authority section; decoding only logs a 'misplaced or corrupt TSIG' warning and keeps the record, and when the application then re-encodes the decoded message (e.g., a forwarder, proxy, or signer) and the TSIG carries an empty MAC, sig_data re-enters itself with no termination condition. The result is a remotely exploitable, unauthenticated denial of service in which fewer than 100 bytes on the wire can exhaust available memory. Only code that re-encodes messages it has decoded is affected, such as Perl-based DNS forwarders, proxies, and middleware; pure decoders/responders that never re-encode are unaffected. No exploitation is currently known: there is no public proof-of-concept, the flaw is not in CISA KEV, and EPSS puts 30-day exploitation probability at about 0.5%.
What to do: Upgrade to Net::DNS 1.57 or later. Audit whether your Perl services re-encode decoded DNS messages (forwarders, proxies, DNSSEC/TSIG signers) — decode-only applications are not affected. As an interim measure, have fronting code drop messages whose TSIG is not the last record on the wire, as RFC 8945 section 5.2 requires, and monitor process memory for abnormal growth.
| Net::DNS project (CPAN) Net::DNS (Perl DNS library) | all versions before 1.57 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
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.
- Weakness
- CWE-674
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
In the news0 stories
No ingested article mentions this CVE yet.