CVE-2026-87079 in Net::IDN::Punycodeinfo

Summary

by MITRE • 09/22/2026

Net::IDN::Punycode versions before 2.590 for Perl allow CPU exhaustion via quadratic insertion cost when decoding a long label in decode_punycode.

The XS backend inserts each decoded code point into a UTF-8 buffer and finds the insertion point by scanning that buffer from the start, one character at a time. The scan runs once per code point over the output built so far, so the cost is quadratic in the label length. The pure-Perl backend downgrades its input to bytes so that substr can index it directly, but takes its working copy before the downgrade, so when the input carries the UTF-8 flag every substr on the copy scans from the start, with the same quadratic cost.

Nothing bounds the label length in the to-Unicode direction. The 63-byte DNS limit is checked only when converting to ASCII, so domain_to_unicode and uts46_to_unicode pass an attacker-supplied label of any length to the decoder.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 09/22/2026

The vulnerability identified in Net::IDN::Punycode versions prior to 2.590 represents a significant resource exhaustion risk stemming from algorithmic inefficiencies during Unicode domain name decoding operations. This issue specifically affects Perl applications that utilize this module for internationalized domain name processing, allowing an attacker to trigger CPU exhaustion through the submission of maliciously crafted input labels. The core technical flaw lies in the implementation of the decode_punycode function, which fails to employ efficient data structures or algorithms for handling character insertion during the conversion from Punycode encoding back to Unicode representation.

In the XS backend, which provides optimized C-level performance for Perl modules, the decoding process involves inserting each decoded code point into a UTF-8 buffer. The implementation determines the correct position for each new character by scanning the existing buffer sequentially from the beginning, one character at a time. Because this linear scan is executed once per code point over the output built so far, the computational complexity becomes quadratic relative to the length of the label being decoded. This means that as the input size increases, the processing time grows exponentially rather than linearly, creating a severe performance bottleneck when handling long labels.

The pure-Perl backend exhibits similar inefficiencies due to how it handles string encoding flags and substring operations. Although this implementation attempts to optimize by downgrading its input to bytes to allow direct indexing via substr, it creates a working copy of the data before performing this downgrade. When the original input carries the UTF-8 flag, every subsequent call to substr on that working copy triggers an internal scan from the start of the string. This behavior replicates the quadratic cost observed in the XS backend, ensuring that both implementation paths within the module are susceptible to performance degradation under specific conditions involving long or maliciously constructed inputs.

A critical aspect of this vulnerability is the lack of bounds checking on label length during Unicode conversion operations. The DNS standard imposes a strict limit of sixty-three bytes per domain label when converting to ASCII format, but Net::IDN::Punycode only enforces this constraint in the reverse direction, from Unicode to ASCII. Consequently, functions such as domain_to_unicode and uts46_to_unicode accept attacker-supplied labels of arbitrary length without validation before passing them to the decoder. This design oversight allows an adversary to supply excessively long Punycode strings that bypass initial size checks but trigger the quadratic processing behavior during decoding, leading to sustained high CPU utilization on the host system.

The operational impact of this vulnerability is primarily centered around denial-of-service conditions affecting Perl-based web applications and services that process internationalized domain names. An attacker can exploit this flaw by sending repeated requests containing long Punycode labels, causing the application server to consume excessive computational resources. This resource exhaustion can degrade service availability for legitimate users, potentially leading to complete system unresponsiveness if not mitigated through rate limiting or input validation at a higher architectural level. The vulnerability aligns with CWE-400, which describes Uncontrolled Resource Consumption, and specifically relates to algorithmic complexity issues that allow attackers to force disproportionate resource usage relative to the size of the input data.

From an offensive security perspective, this flaw can be leveraged in conjunction with other attack vectors to amplify denial-of-service effects against web infrastructure or API endpoints that rely on domain name resolution or validation. It is relevant to ATT&CK technique T1496, Resource Hijacking, where attackers use computing resources for their own purposes, such as causing a service outage by exhausting CPU cycles through inefficient algorithmic exploitation. The vulnerability underscores the importance of validating input constraints early in the processing pipeline and ensuring that encoding conversions do not introduce quadratic time complexities regardless of the implementation language or backend used within the module.

Mitigation strategies should focus on immediate updates to Net::IDN::Punycode version 2.590 or later, where these algorithmic inefficiencies have been addressed through optimized data structures and proper bounds checking. For environments unable to patch immediately, defensive measures include implementing strict input length validation at the network perimeter or application gateway level before requests reach the Perl backend. Additionally, deploying rate limiting mechanisms can help mitigate the impact of repeated exploitation attempts by capping the number of decoding operations allowed per unit of time. Security teams should also monitor for unusual spikes in CPU usage associated with domain name processing functions to detect potential active exploitation of this vulnerability.

Responsible

CPANSec

Reservation

09/08/2026

Disclosure

09/22/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!