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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | Net-IDN-Encode | 2.301 – < 2.590 | 2.590 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libnet-idn-encode-perl | 2.600-1 | — |
| Debian 13 | libnet-idn-encode-perl | No fix yet | — |
| Debian 12 | libnet-idn-encode-perl | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | libnet-idn-encode-perl | No fix yet | — |
| Ubuntu 26.04 LTS | libnet-idn-encode-perl | No fix yet | — |
| Ubuntu 24.04 LTS | libnet-idn-encode-perl | No fix yet | — |
| Ubuntu 22.04 LTS | libnet-idn-encode-perl | No fix yet | — |
| Ubuntu 20.04 LTS | libnet-idn-encode-perl | No fix yet | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | libnet-idn-encode-perl | No fix yet | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | perl-Net-IDN-Encode | 2.600.0-1.1 | openSUSE-SU-2026:12468-1 |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | perl-Net-IDN-Encode | 2.590-1.amzn2023.0.1 | ALAS2023-2026-3190 |
Advisories 2
- openSUSE-SU-2026:12468-1 perl-Net-IDN-Encode-2.600.0-1.1 on GA media SUSE / openSUSE Security Updates · Nov 7, 2026
- ALAS2023-2026-3190 Important: perl-Net-IDN-Encode security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Oct 12, 2026
References
- https://metacpan.org/release/PJCJ/Net-IDN-Encode-2.590-TRIAL/changes release-notes
- https://github.com/robrwo/Net-IDN-Encode/commit/259e74c5739175b063c5393a4ce4a0705678ba61.patch patch
- https://github.com/robrwo/Net-IDN-Encode/commit/2fbc71e4d8517ab65c5d5d35fda086371b735a3f.patch patch
- https://www.cve.org/CVERecord?id=CVE-2016-15059 related