CVE-2026-74766 Details
Description
Net::IDN::Punycode versions from 2.301 before 2.590 for Perl allow a heap use-after-free via a decoded code point that reallocates the output buffer in decode_punycode. The XS backend inserts each decoded code point into the string buffer of the scalar it returns. decode_punycode computes the insertion pointer first and only then grows the buffer when the code point does not fit. The growth reallocates the buffer and updates every pointer except the insertion pointer, so the move that follows and the write of the code point go through a freed pointer. The buffer starts at twice the label length, and a code point above U+FFFF takes four bytes in the output, so a label of such code points outgrows it and forces the reallocation. Version 2.301, the fix for CVE-2016-15059, introduced the defect. Only the XS backend is affected. Decoding an attacker-supplied punycode label reads and writes freed heap memory.
A heap use-after-free vulnerability has been identified in the Net::IDN::Punycode Perl module, specifically in versions prior to 2.590. The issue arises in the XS backend, where the 'decode_punycode' function improperly manages memory. The function decodes Punycode labels by inserting each decoded code point into a string buffer. However, when the buffer needs to be expanded to accommodate larger code points, the reallocation process fails to update the insertion pointer correctly. This oversight allows subsequent writes to be directed through a pointer that has already been freed, leading to memory corruption. The vulnerability can be exploited by decoding an attacker-supplied Punycode label, which causes the function to read and write over freed heap memory.
Users can upgrade to Net::IDN::Punycode version 2.590 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Sep 22, 2026CISA-ADP
Assessed Sep 22, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/robrwo/Net-IDN-Encode/commit/259e74c5739175b063c5393a4ce4a0705678ba61.patch | CPANSec | Source Code |
| https://github.com/robrwo/Net-IDN-Encode/commit/2fbc71e4d8517ab65c5d5d35fda086371b735a3f.patch | CPANSec | Source Code |
| https://metacpan.org/release/PJCJ/Net-IDN-Encode-2.590-TRIAL/changes | CPANSec | Release NotesVendor |
| https://www.cve.org/CVERecord?id=CVE-2016-15059 | CPANSec | AdvisoryBroken Link |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-416 | Use After Free | CPANSec |
Affected Products
| Product | Versions |
|---|---|
| Net::IDN::Punycode | < 2.301 |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Sep 22, 2026 | CVE Modified | CISA-ADP |
| Sep 22, 2026 | New CVE Received | CPANSec |
Volerion