# CVE-2026-117678: idna: punycode labels are decoded before the 63-octet length check, so a long xn-- label causes super-linear CPU use

- **Severity:** MEDIUM 6.9
- **CVSS:** 6.9 (v4.0, CNA) `CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Attack requirements: None; Privileges required: None; User interaction: None; Confidentiality impact: None; Integrity impact: None; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.18% (percentile 4, 2026-11-28)
- **CWE:** CWE-407
- **Published:** 2026-11-19T05:36:30.709Z
- **Modified:** 2026-11-23T15:08:56.100Z

## Who should check

- Anyone running benoitc idna \>= 0.5.0, \< 8.0.0
- Anyone running benoitc idna \>= c8caba6653259071f7076fe49320f37402b8b81f, \< 7a465b630eb793556aa7ac282fb73e49251dadd2

## Description

Inefficient Algorithmic Complexity vulnerability in benoitc idna allows an attacker who controls a hostname passed to the library to exhaust CPU via an over-long xn-- label. idna:ulabel/1 in src/idna.erl hands every ASCII label that starts with xn-- to punycode:decode/1 without applying check\_label\_length/1, the 63-octet DNS label limit. punycode:decode/1 in src/punycode.erl builds its output with list appends in insert/4, so its cost grows super-linearly with the label length. A label of a few kilobytes keeps a scheduler busy for seconds to minutes before the label is rejected as invalid punycode.

Every decode entry point reaches this path: decode/1, decode/2, to\_unicode/1 and from\_ascii/1. The encode path reaches it as well, because alabel/1 calls ulabel/1 on an ASCII xn-- label before its own length check, so encode/1, encode/2 and to\_ascii/1 are affected for such input.

This issue affects idna: from 0.5.0 before 8.0.0.

## Affected and fixed versions

- benoitc idna: \>= 0.5.0, \< 8.0.0 (cvelist)
- benoitc idna: \>= c8caba6653259071f7076fe49320f37402b8b81f, \< 7a465b630eb793556aa7ac282fb73e49251dadd2 (cvelist)

## Mitigation

- Upgrade idna to 8.0.0 or later.
- Upgrade idna to 7a465b630eb793556aa7ac282fb73e49251dadd2 or later.
- Vendor workaround: Before passing a hostname to idna, reject any domain that contains a label longer than 63 octets. The DNS limits labels to that length, so legitimate names pass unchanged, and the decoder never runs on the crafted label. The check must run before every call that reaches idna:ulabel/1, including encode/1 and to\_ascii/1, because alabel/1 decodes an ASCII xn-- label before checking its length.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-117678. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-117678.md
Affected: benoitc idna >= 0.5.0, < 8.0.0; benoitc idna >= c8caba6653259071f7076fe49320f37402b8b81f, < 7a465b630eb793556aa7ac282fb73e49251dadd2
Fixed in: benoitc idna 8.0.0, benoitc idna 7a465b630eb793556aa7ac282fb73e49251dadd2

Steps:
1. Search this machine and project for benoitc idna: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-117678 being exploited?

There is no confirmed exploitation: CVE-2026-117678 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-117678?

Medium: CVSS 6.9 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-117678?

benoitc idna \>= 0.5.0, \< 8.0.0; benoitc idna \>= c8caba6653259071f7076fe49320f37402b8b81f, \< 7a465b630eb793556aa7ac282fb73e49251dadd2.

### Is there a fix for CVE-2026-117678?

Yes. Fixed in benoitc idna 8.0.0, benoitc idna 7a465b630eb793556aa7ac282fb73e49251dadd2. Upgrade idna to 8.0.0 or later. Upgrade idna to 7a465b630eb793556aa7ac282fb73e49251dadd2 or later. Vendor workaround: Before passing a hostname to idna, reject any domain that contains a label longer than 63 octets. The DNS limits labels to that length, so legitimate names pass unchanged, and the decoder never runs on the crafted label. The check must run before every call that reaches idna:ulabel/1, including encode/1 and to\_ascii/1, because alabel/1 decodes an ASCII xn-- label before checking its length.

### How do I check if I'm affected by CVE-2026-117678?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://github.com/benoitc/erlang-idna/pull/44>
- patch: <https://github.com/benoitc/erlang-idna/pull/45>
- patch: <https://github.com/benoitc/erlang-idna/commit/c8caba6653259071f7076fe49320f37402b8b81f>
- patch: <https://github.com/benoitc/erlang-idna/commit/7a465b630eb793556aa7ac282fb73e49251dadd2>
- other: <https://cna.erlef.org/cves/CVE-2026-117678.html>
- other: <https://osv.dev/vulnerability/EEF-CVE-2026-117678>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-117678>
- FIRST EPSS: EPSS scores by FIRST <https://www.first.org/epss/>

HTML: <https://flawdb.com/CVE-2026-117678> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-117678>
