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.

Analysis

AI-generated

Technical impact

Net::IDN::Punycode for Perl contains a heap buffer overflow in the XS backend’s encode_punycode function. The implementation sizes an output buffer based on the input length but omits bounds checks for the final digit and the terminating NUL. This allows an attacker‑supplied string to overflow the buffer and corrupt heap memory, which can lead to arbitrary code execution.

Affected Systems

The flaw affects all Net::IDN::Punycode versions released before 2.301. Only the XS backend is vulnerable; the pure‑Perl implementation is unaffected. Any system that uses the XS backend to process internationalized domain names is at risk.

Risk and Exploitability

An attacker who can supply a crafted IDN label to the encode_punycode function can trigger the overflow and corrupt the heap, potentially allowing arbitrary code execution. The CVSS base score of 9.8 indicates a critical severity and the EPSS score of < 1% suggests a low probability of exploitation. The vulnerability is not listed in CISA KEV, and no public exploits are reported.

Remediation

Vendor Solution

Upgrade to Net-IDN-Encode 2.301 or later.


OpenCVE Recommended Actions

  • Apply Net‑IDN‑Encode version 2.301 or later to replace the vulnerable XS backend.
  • Ensure that your application is not using the XS backend by checking the module version at runtime or inspecting the code that calls encode_punycode.
  • If an immediate upgrade is not possible, disable IDN processing or reject internationalized domain names until the fix is applied.

Generated by OpenCVE AI on September 22, 2026 at 17:21 UTC.

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
  • CWE-122

    Heap-based Buffer Overflow

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