Skip to main content

Net::IDN::Punycode CVE-2026-74766

| EUVDEUVD-2026-84290 HIGH
Use After Free (CWE-416)
2026-09-22 CPANSec GHSA-qffm-j59f-77qw
8.4
CVSS 3.1 · Vendor: CPANSec
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft punycode label of >U+FFFF code points
  2. Delivery
    Deliver to app decoding via XS backend
  3. Exploit
    Buffer reallocation frees output pointer
  4. Execution
    Write code point through stale insertion pointer
  5. Impact
    Corrupt/read freed heap memory

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires a Perl application to call Net::IDN::Punycode's decode_punycode on attacker-supplied input while using the affected XS backend at versions 2.301 through 2.589 (fixed in 2.590). The triggering label must contain enough code points above U+FFFF (four UTF-8 bytes each) to outgrow the output buffer, which is pre-sized at twice the label length, forcing the reallocation. LIMITS: the pure-Perl (PP) backend is explicitly NOT affected, so deployments forcing the PP implementation are safe; exploitability and network reachability depend entirely on whether and how the consuming application decodes untrusted punycode (e.g., IDN domains/emails), and no authentication or user interaction is inherent to the library call itself.

Impact

This is a genuine heap use-after-free (CWE-416) in the XS backend of a real, maintained Perl IDN library, confirmed by source diff and a vendor patch. Key signal conflict: the input CVSS vector is AV:L (local) yet PR:N/UI:N, while the flaw is triggered by 'an attacker-supplied punycode label' - for the module's most common use (decoding IDN domains, URLs, or email addresses arriving over the network), the realistic attack vector is network-reachable, so AV:L likely understates reachability; I assess AV:N and flag this for verification, since a pure library's base vector depends on the consuming application. The C:H/I:H/A:H impact is defensible because the bug is a read-and-write through a freed pointer (a heap corruption + potential info-leak primitive), but no weaponized exploit or demonstrated RCE exists - the patch ships only a round-trip regression test, not an exploit. No EPSS score, no CISA KEV listing, and no standalone POC were provided. Net: a technically serious memory-corruption bug with a confirmed fix, but current evidence points to crash/info-disclosure potential rather than proven, widespread exploitation - moderate real-world priority, prioritized where Perl services decode untrusted punycode via the XS backend.

Exploit ScenarioDerived

An attacker submits a punycode label containing many code points above U+FFFF (each four UTF-8 bytes) - for example embedded in an IDN domain, URL, or email address - to a Perl application that decodes it via the affected XS backend. The label outgrows the initial buffer (sized at twice the label length), forcing a reallocation that frees the buffer while the stale insertion pointer is still used, so the subsequent move and code-point write hit freed heap memory, enabling memory disclosure or heap corruption. No public weaponized exploit exists; the vendor patch adds only a decode round-trip regression test.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 22, 2026

Heap use-after-free in the XS backend of Net::IDN::Punycode 2.301 through 2.589 allows an attacker-supplied punycode label that decodes to enough code points above U+FFFF to corrupt memory in the decoding Perl process, granting both read and write access to freed heap memory (CWE-416, CVSS 8.4). The defect was introduced by the 2.301 fix for CVE-2016-15059 and is confined to the XS implementation; deployments using the pure-Perl backend are not affected, and no public exploit code has been identified at time of analysis. Reachability depends on whether the consuming application feeds untrusted punycode into decode_punycode (for example IDN hostnames or internationalized email addresses), but the vulnerable call itself requires no authentication (CVSS PR:N).

RemediationAI

Vendor-released patch: upgrade Net::IDN::Punycode to 2.590 or later, shipped in the Net-IDN-Encode 2.590 release (see the changes file at https://metacpan.org/release/PJCJ/Net-IDN-Encode-2.590-TRIAL/changes); the upstream fixes are the commits at https://github.com/robrwo/Net-IDN-Encode/commit/259e74c5739175b063c5393a4ce4a0705678ba61.patch and https://github.com/robrwo/Net-IDN-Encode/commit/2fbc71e4d8517ab65c5d5d35fda086371b735a3f.patch, which reorder the buffer growth before the insertion pointer is computed and add a regression test for astral-plane labels. If an immediate upgrade is not possible, switching the deployment to the pure-Perl backend eliminates the flaw entirely at a measurable performance cost for IDN-heavy workloads, since decode_punycode in PP does not maintain cached buffer pointers. An additional compensating control is to validate or reject punycode/IDN labels whose decoded form contains code points above U+FFFF before passing them to decode_punycode, which defeats the four-byte-per-code-point expansion that forces the reallocation, but the trade-off is that this rejects legitimate emoji and other astral-plane internationalized labels. Where IDN decoding is only needed for a trusted, known set of domains, restricting untrusted input to a hardcoded allowlist or performing IDN normalization outside the vulnerable library removes exposure without functionality loss. Confirm which backend is actually loaded (XS versus PP) before relying on any workaround, since the backend may be selected automatically at build time.

Affected ProductsAI

The affected component is Net::IDN::Punycode versions 2.301 up to and including 2.589 when built with its XS backend, distributed as part of the Net-IDN-Encode distribution maintained by PJCJ/robrwo on CPAN (CWE-416, EUVD-2026-84290). Version 2.301 in particular is the release that fixed the earlier issue CVE-2016-15059 and, in doing so, introduced this use-after-free; every subsequent release before 2.590 inherits it. The pure-Perl (PP) backend in the same distribution is explicitly not affected, so installations that force the PP implementation, and any consumer that never calls decode_punycode on untrusted punycode, are outside the exposure. The fix is delivered in Net-IDN-Encode 2.590, documented in the release changes file at https://metacpan.org/release/PJCJ/Net-IDN-Encode-2.590-TRIAL/changes, with the reference record at https://nvd.nist.gov/vuln/detail/CVE-2026-74766 and the historical issue at https://www.cve.org/CVERecord?id=CVE-2016-15059.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Net::IDN::Punycode is a Perl implementation of the Punycode/IDNA bootstring algorithm (RFC 3492) used for internationalized domain name encoding and decoding. It ships two backends: a pure-Perl implementation and an XS/C implementation, and only the XS backend contains the flaw. In decode_punycode, each decoded code point is appended into the string buffer of the scalar being returned; the code computes the insertion pointer into that buffer before checking whether the buffer has room, and only then calls grow_string when the code point does not fit. grow_string reallocates the buffer and correctly updates the internal start, current and end pointers (re_s, re_p, re_e), but not the separately cached insertion pointer. The move and subsequent write of the code point therefore execute through a pointer into memory that has already been freed. The buffer is initially sized at twice the label length, while a code point above U+FFFF occupies four bytes of UTF-8 output, so a label composed of such astral-plane code points exhausts the initial allocation and forces the reallocation that triggers the dangling-pointer access. The root cause class is CWE-416 (use-after-free) in native XS code, and the fix in 2.590 reorders the grow_string call ahead of the pointer computation, as shown in upstream commit 259e74c5 and its companion commit 2fbc71e4.

Know when Perl gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (CPANSec) PRIMARY 8.4 HIGH
AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 9.8 CRITICAL

Punycode decoding commonly processes remote IDN input so AV:N (vendor chose AV:L); no auth/interaction inherent to the library call; freed-memory read+write yields high C/I/A, though reliable RCE is undemonstrated.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (CPANSec).

CVSS VectorVendor: CPANSec

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

3
CVSS changed
Sep 22, 2026 - 13:22 NVD
8.4 (HIGH)
CVE Published
Sep 22, 2026 - 07:19 cve.org
HIGH 8.4
CVE Published
Sep 22, 2026 - 07:19 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

Net::IDN::Punycode 2.301 through 2.589 contains a heap use-after-free in its XS decoding backend that can be triggered by an unauthenticated attacker-supplied punycode label, allowing corruption of memory in the Perl process that performs the decoding. Organizations whose applications process untrusted internationalized domain names or internationalized email addresses are exposed, with consequences ranging from process crashes and disclosure of freed memory contents to potential further compromise of the affected service. Leadership should treat this as a high-priority remediation item because the vulnerable code path requires no credentials and the library is widely embedded in Perl-based mail, DNS, and web handling pipelines.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 95% exploitable
Prevalence
Medium
widely-used Perl IDN encoding library with notable CPAN reverse dependencies
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Perl

View all
CVE-2012-6329 HIGH POC
7.5 Jan 04

The _compile function in Maketext.pm in the Locale::Maketext implementation in Perl before 5.17.7 does not properly hand

CVE-2017-12814 CRITICAL POC
9.8 Sep 28

Stack-based buffer overflow in the CPerlHost::Add method in win32/perlhost.h in Perl before 5.24.3-RC1 and 5.26.x before

CVE-2015-8608 CRITICAL POC
9.8 Feb 07

The VDir::MapPathA and VDir::MapPathW functions in Perl 5.22 allow remote attackers to cause a denial of service (out-of

CVE-2018-18314 CRITICAL POC
9.8 Dec 07

Perl before 5.26.3 has a buffer overflow via a crafted regular expression that triggers invalid write operations. Rated

CVE-2018-18312 CRITICAL POC
9.8 Dec 05

Perl before 5.26.3 and 5.28.0 before 5.28.1 has a buffer overflow via a crafted regular expression that triggers invalid

CVE-2018-18313 CRITICAL POC
9.1 Dec 07

Perl before 5.26.3 has a buffer over-read via a crafted regular expression that triggers disclosure of sensitive informa

CVE-2016-2381 HIGH
7.5 Apr 08

Perl might allow context-dependent attackers to bypass the taint protection mechanism in a child process via duplicate e

CVE-2023-31484 HIGH POC
8.1 Apr 29

CPAN.pm before 2.35 does not verify TLS certificates when downloading distributions over HTTPS. Rated high severity (CVS

CVE-2016-6185 HIGH POC
7.8 Aug 02

The XSLoader::load method in XSLoader in Perl does not properly locate .so files when called in a string eval, which mig

CVE-2018-12015 HIGH POC
7.5 Jun 07

In Perl through 5.26.2, the Archive::Tar module allows remote attackers to bypass a directory-traversal protection mecha

CVE-2020-10543 HIGH
8.2 Jun 05

Perl before 5.30.3 on 32-bit platforms allows a heap-based buffer overflow because nested regular expression quantifiers

CVE-2015-8853 HIGH
7.5 May 25

The (1) S_reghop3, (2) S_reghop4, and (3) S_reghopmaybe3 functions in regexec.c in Perl before 5.24.0 allow context-depe

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy