CPANSA-Net-IDN-Encode-2016-15059: Net-IDN-Encode vulnerability

Publisher giterlizzi Document category csaf_security_advisory
Initial release date 2026-09-22T00:00:00 Engine CSAF Perl Toolkit 0.26
Current release date 2026-09-22T00:00:00 Build Date
Current version 1 Status final
CVSS v3.1 Base Score 9.8 Severity Critical
Original language Language en
Also referred to

Vulnerability Description

Net::IDN::Punycode versions before 2.301 for Perl allow a heap buffer overflow via unchecked writes past the output buffer in encode_punycode.

The XS backend builds the encoded label in the string buffer of the scalar it returns, sized from the input length. The loop that emits the digits of each code point checks for room before every write, but the write of the last digit of each round and the write of the terminating NUL do not, so an input whose encoded form fills the buffer writes past its end.

Only the XS backend is affected.

Encoding an attacker-supplied string corrupts the heap.

Vulnerabilities

CVE-2016-15059

Vulnerability Description

Net::IDN::Punycode versions before 2.301 for Perl allow a heap buffer overflow via unchecked writes past the output buffer in encode_punycode.

The XS backend builds the encoded label in the string buffer of the scalar it returns, sized from the input length. The loop that emits the digits of each code point checks for room before every write, but the write of the last digit of each round and the write of the terminating NUL do not, so an input whose encoded form fills the buffer writes past its end.

Only the XS backend is affected.

Encoding an attacker-supplied string corrupts the heap.

Weakness CWE-122 : Heap-based Buffer Overflow

Product status

Known affected
Product Score
Net-IDN-Encode less than 2.301
CVSS Version CVSS Vector CVSS Base Score CVSS Base Severity
3.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H 9.8 Critical
Fixed

giterlizzi

Namespace: https://github.com/giterlizzi/

gdt@cpan.org

References

Revision history

Version Date of the revision Summary of the revision
1 Tue Sep 22 00:00:00 2026 First release

Sharing rules

TLP:WHITE
For the TLP version see: https://www.first.org/tlp/