CVE-2016-15059

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

Published Sep 22, 2026 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
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.

Remediation

Vendor Solution

Upgrade to Net-IDN-Encode 2.301 or later.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Perl
Perl net::idn::punycode
Vendors & Products Perl
Perl net::idn::punycode
Type Values Removed Values Added
References
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Metrics cvssV3_1

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

Type Values Removed Values Added
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.
Title Net::IDN::Punycode versions before 2.301 for Perl allow a heap buffer overflow via unchecked writes past the output buffer in encode_punycode
Weaknesses CWE-122
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
CPANSec
Published
Updated
Sep 22, 2026, 5:07 PM
Reserved
Sep 8, 2026, 8:13 PM
Status
Deferred
Published
Sep 22, 2026, 8:16 AM
Modified
Sep 22, 2026, 7:07 PM