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.
Published: 2026-09-22
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Arbitrary code execution via heap overflow
Action: Immediate patch
AI Analysis

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.

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

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 yet.

History

Tue, 22 Sep 2026 18:30:00 +0000

Type Values Removed Values Added
References
Metrics ssvc

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


Tue, 22 Sep 2026 16:30:00 +0000

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'}


Tue, 22 Sep 2026 07:30:00 +0000

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

Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-09-22T17:07:23.412Z

Reserved: 2026-09-08T20:13:11.773Z

Link: CVE-2016-15059

cve-icon Vulnrichment

Updated: 2026-09-22T17:07:23.412Z

cve-icon NVD

Status : Received

Published: 2026-09-22T08:16:34.520

Modified: 2026-09-22T18:17:07.123

Link: CVE-2016-15059

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-22T17:30:18Z

Weaknesses
  • CWE-122

    Heap-based Buffer Overflow