Skip to main content

Net::IDN::Punycode CVE-2026-87078

| EUVDEUVD-2026-84291 CRITICAL
Memory Leak (CWE-401)
2026-09-22 CPANSec GHSA-xcgq-9mhw-ww57
9.1
CVSS 3.1 · Vendor: CPANSec
View

Attack ChainAIDerived

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

  1. Access
    Identify Perl service processing untrusted IDN input
  2. Delivery
    Send oversized malformed Punycode label
  3. Exploit
    Trigger croak in XS decode_punycode
  4. Execution
    Output buffer left unfreed per call
  5. Persist
    Repeat thousands of calls
  6. Impact
    Exhaust process memory (OOM DoS)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Resource cleanup, leak prevention
Exploitation Conditions

Requires a host application that (1) uses the compiled XS backend of Net::IDN::Punycode (versions 2.302 up to but not including 2.590), not the pure-Perl PP fallback, and (2) passes attacker-controlled data into decode_punycode (to-Unicode direction) or encode_punycode. The to-Unicode path has no label-length bound (the 63-byte DNS limit is only enforced when converting to ASCII), so an attacker can supply arbitrarily long invalid labels. Exploitation needs repeated rejected calls to accumulate leaked memory into a DoS; a single call is harmless. Limiting factor: impact is confined to applications that expose this function to untrusted input, and switching to the pure-Perl backend avoids the flaw entirely.

Impact

The vendor CVSS of 9.1 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H) overstates real risk because of a mislabeling: this is a CWE-401 memory leak, and the 'leak' is of an unfreed output buffer, NOT disclosure of data to the attacker. The C:H metric and the 'Information Disclosure' tag are inconsistent with the described mechanism - a rejected label leaves an allocated scalar/buffer behind; the attacker never reads that memory. The genuine, well-supported impact is availability: unbounded process growth (twice the label length per rejected call, no successful call needed) leading to memory-exhaustion DoS, so A:H is defensible while C:H is not. No EPSS score, no CISA KEV listing, and no standalone public exploit are present in the input - only a vendor regression test (t/punycode_leak-xs.t) that demonstrates the growth. Exploitation is also application-gated: the flaw is in a library, so an attacker can only reach it if a host application feeds attacker-controlled input to the XS decode_punycode/encode_punycode path. Net priority: a real DoS worth patching in exposed IDN-processing services, but the 9.1 headline number is inflated by an incorrect confidentiality rating - treat as a high-availability-impact issue, not a data-breach issue.

Exploit ScenarioDerived

An attacker repeatedly submits malformed IDN/Punycode labels (e.g. a long 'a'*2000 label plus an invalid byte such as 0xFF) to a Perl service that calls Net::IDN::Punycode::decode_punycode on untrusted input using the XS backend. Each rejected call croaks after allocating but before freeing a buffer sized at twice the input length, so sustained invalid traffic grows the process memory without bound until it is OOM-killed. No public weaponized exploit is identified; only a vendor regression test demonstrating the leak exists.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
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

Repeatedly feeding malformed labels to the XS backend of Net::IDN::Punycode (Net::IDN::Encode, versions 2.302 up to but not including 2.590) leaks an unfreed output buffer on every rejected call, allowing an unauthenticated remote sender to grow a host process's memory by roughly twice the label length per rejection and eventually cause a denial of service. Because the to-Unicode direction enforces no 63-byte DNS label limit (that check exists only on the ASCII side), the leak is unbounded per call and requires no successful decode at all - only a host application that passes attacker-controlled data into decode_punycode (or encode_punycode) while using the compiled XS backend, not the pure-Perl fallback. The vendor rated this 9.1 with high confidentiality impact, but independent assessment classifies it as availability-only (CWE-401): the leaked object is an unshared output buffer, so no data is disclosed to the attacker, and no public exploit code or confirmed active exploitation was identified at time of analysis.

RemediationAI

Upgrade to Net::IDN::Encode/Net::IDN::Punycode 2.590 or later; the upstream fixes are commits 92572f726e48af5559de4cc8a831463b79dfb217 and edad63e0eeeeb18d93bc6dfe4d9dcdff9c244e1b (patch available from vendor, released as version 2.590-TRIAL per the change log at https://metacpan.org/release/PJCJ/Net-IDN-Encode-2.590-TRIAL/changes), which introduce a croak_free() wrapper that releases the return scalar on error paths. If upgrading immediately is impractical, the most effective workaround is to avoid the affected code entirely: install or force the pure-Perl implementation (Net::IDN::Punycode::PP, e.g. via the module's pure-Perl build option) so the leaking XS allocations are never executed, accepting the slower decoding performance as the trade-off. As a secondary compensating control, bound the damage by validating and length-limiting labels before they reach decode_punycode: rejecting inputs longer than the DNS 63-byte limit or filtering non-base/UTF-8-invalid labels at the application boundary caps each leak at a small constant and prevents the unbounded growth the to-Unicode path otherwise permits, though it must be applied consistently and cannot fully eliminate the leak. Also cap per-worker process memory and recycle workers aggressively (for example, mod_perl/Plack process recycling or MaxRequestsPerChild-style restarts) so accumulated leaked buffers are reclaimed before they exhaust the process, and monitor RSS growth in long-lived services that accept external IDN input.

Affected ProductsAI

Net::IDN::Punycode as distributed in the Net::IDN::Encode Perl distribution, versions 2.302 through 2.589 (all releases before 2.590), when compiled with the XS backend rather than the pure-Perl fallback; the to-Unicode decode_punycode function is the primary attack surface, with encode_punycode also covered by the upstream fix. The pure-Perl backend (Net::IDN::Punycode::PP) and builds that skip the XS compiler (e.g., PUREPERL_ONLY=1) are not affected. No CPE strings were supplied in the source intelligence for this CVE; the change log for the fixed trial release is at https://metacpan.org/release/PJCJ/Net-IDN-Encode-2.590-TRIAL/changes, and the authoritative entry is NVD https://nvd.nist.gov/vuln/detail/CVE-2026-87078 (ENISA EUVD-2026-84291).

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 implements RFC 3492 Punycode/IDNA conversion for Perl and ships in the Net::IDN::Encode distribution with two interchangeable backends: a compiled XS implementation and a pure-Perl (PP) fallback. The flaw is a CWE-401 missing-release condition in the XS C code, which allocates the return scalar (RETVAL) and its backing buffer - sized at twice the input length - before validating the input, and only decrements the reference count on the success path. Every rejection path (croak on non-base character, incomplete encoded code point, invalid digit, punycode limit overflow, or invalid code point) previously called croak() directly, orphaning the scalar and its buffer; the upstream fix adds a croak_free() helper that performs SvREFCNT_dec on RETVAL before raising the error. The defect also affects encode_punycode per the patch, but the decode (to-Unicode) path is the more severe vector because it applies no equivalent of the 63-byte DNS label limit enforced when converting to ASCII, allowing arbitrarily long rejected inputs. The vulnerability exists only in the XS backend - the pure-Perl code does not share this allocation pattern - so exposure depends on how the module was built and on whether the host application exposes these functions to untrusted input.

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 9.1 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
vuln.today AI 7.5 HIGH

Remotely reachable, low-complexity, unauthenticated resource leak causing memory-exhaustion DoS; no confidentiality or integrity impact, so C:N/I:N and A:H.

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

Primary rating from Vendor (CPANSec).

CVSS VectorVendor: CPANSec

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

Lifecycle Timeline

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

DescriptionCVE.org

Net::IDN::Punycode versions from 2.302 before 2.590 for Perl leak the output buffer on every rejected label in decode_punycode.

The XS backend allocates the scalar it returns before it validates the input, sizing the buffer at twice the input length. The scalar is released only on the success path, so each of the three croaks that reject a label leaves the scalar and its buffer allocated. Nothing bounds the label length in the to-Unicode direction, since the 63-byte DNS limit is checked only when converting to ASCII.

Only the XS backend is affected.

A sender who supplies invalid labels grows the process by twice the label length per rejected call, with no successful call needed.

Executive ViewAI

Why It Matters

Net::IDN::Encode (the compiled XS backend of Net::IDN::Punycode, versions 2.302 through 2.589) mishandles memory on rejected input, so malformed internationalized domain labels steadily consume host process memory until the service becomes unavailable. Any internet-facing workload that passes untrusted data into this library - mail gateways, web proxies, API gateways, DNS tooling - is exposed to a repeatable denial of service that requires no valid decode and no prior access. The failure mode is availability, not disclosure: independent analysis classifies this as an unfreed output buffer (CWE-401) with no data exposed to the attacker, so leadership should prioritize restoring service resilience rather than initiating breach response.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 95% exploitable
Prevalence
Medium
common CPAN IDN/domain-handling library, but limited to Perl deployments
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 CRITICAL
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
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
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

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

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