CVE-2026-45409: CWE-1333: Inefficient Regular Expression Complexity in kjd idna
Internationalized Domain Names in Applications (IDNA) for Python provides support for Internationalized Domain Names in Applications (IDNA) and Unicode IDNA Compatibility Processing. In versions prior to 3.15, payloads such as `"\u0660" * N` or `"\u30fb" * N + "\u6f22"` utilize the `valid_contexto` function prior to length rejection, and for high values of `N` will take a long time to process. This is the same issue as CVE-2024-3651, however the original remediation in 2024 was not a complete fix. A specially crafted argument to the `idna.encode()` function could consume significant resources. This may lead to a denial-of-service. Starting in version 3.14, the function rejects long inputs as soon as practicable prior to any further processing to minimize resource consumption. In version 3.15, this approach was extended to lesser used alternate functions (i.e. per-label conversions and codec support). A workaround is available. Domain names cannot exceed 253 characters in length. If this length limit is enforced prior to passing the domain to the `idna.encode()` function, it should no longer consume significant resources. This is triggered by arbitrarily large inputs that would not occur in normal usage, but may be passed to the library assuming there is no preliminary input validation by the higher-level application.
AI Analysis
Technical Summary
CVE-2026-45409 describes an inefficient regular expression complexity vulnerability (CWE-1333) in the kjd idna library for Python versions before 3.15. The vulnerability involves the valid_contexto function processing long inputs such as repeated Unicode characters before length rejection, causing excessive processing time. This vulnerability is similar to CVE-2024-3651, but the original fix was incomplete. The vulnerability can be triggered by passing arbitrarily large inputs to the idna.encode() function, potentially leading to denial-of-service due to resource exhaustion. Starting in version 3.14, the library began rejecting long inputs earlier to reduce resource consumption, and version 3.15 extended this to additional functions. A practical workaround is to enforce the maximum domain name length of 253 characters before invoking idna.encode().
Potential Impact
An attacker can cause a denial-of-service condition by supplying specially crafted, excessively long inputs to the idna.encode() function, which leads to inefficient regular expression processing and high resource consumption. This can degrade service availability. The issue only occurs with inputs that exceed normal domain name lengths and would not typically arise during standard usage.
Mitigation Recommendations
Upgrade to kjd idna version 3.15 or later, where the vulnerability is fully addressed by early rejection of long inputs. If upgrading is not immediately possible, enforce a maximum domain name length of 253 characters before passing inputs to the idna.encode() function to prevent excessive resource consumption. There is no official patch advisory provided, so check vendor sources for updates.
CVE-2026-45409: CWE-1333: Inefficient Regular Expression Complexity in kjd idna
Description
Internationalized Domain Names in Applications (IDNA) for Python provides support for Internationalized Domain Names in Applications (IDNA) and Unicode IDNA Compatibility Processing. In versions prior to 3.15, payloads such as `"\u0660" * N` or `"\u30fb" * N + "\u6f22"` utilize the `valid_contexto` function prior to length rejection, and for high values of `N` will take a long time to process. This is the same issue as CVE-2024-3651, however the original remediation in 2024 was not a complete fix. A specially crafted argument to the `idna.encode()` function could consume significant resources. This may lead to a denial-of-service. Starting in version 3.14, the function rejects long inputs as soon as practicable prior to any further processing to minimize resource consumption. In version 3.15, this approach was extended to lesser used alternate functions (i.e. per-label conversions and codec support). A workaround is available. Domain names cannot exceed 253 characters in length. If this length limit is enforced prior to passing the domain to the `idna.encode()` function, it should no longer consume significant resources. This is triggered by arbitrarily large inputs that would not occur in normal usage, but may be passed to the library assuming there is no preliminary input validation by the higher-level application.
CVSS v4.0
Score 6.9medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-45409 describes an inefficient regular expression complexity vulnerability (CWE-1333) in the kjd idna library for Python versions before 3.15. The vulnerability involves the valid_contexto function processing long inputs such as repeated Unicode characters before length rejection, causing excessive processing time. This vulnerability is similar to CVE-2024-3651, but the original fix was incomplete. The vulnerability can be triggered by passing arbitrarily large inputs to the idna.encode() function, potentially leading to denial-of-service due to resource exhaustion. Starting in version 3.14, the library began rejecting long inputs earlier to reduce resource consumption, and version 3.15 extended this to additional functions. A practical workaround is to enforce the maximum domain name length of 253 characters before invoking idna.encode().
Potential Impact
An attacker can cause a denial-of-service condition by supplying specially crafted, excessively long inputs to the idna.encode() function, which leads to inefficient regular expression processing and high resource consumption. This can degrade service availability. The issue only occurs with inputs that exceed normal domain name lengths and would not typically arise during standard usage.
Mitigation Recommendations
Upgrade to kjd idna version 3.15 or later, where the vulnerability is fully addressed by early rejection of long inputs. If upgrading is not immediately possible, enforce a maximum domain name length of 253 characters before passing inputs to the idna.encode() function to prevent excessive resource consumption. There is no official patch advisory provided, so check vendor sources for updates.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-12T01:48:40.452Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a234ebde29bf47b50cf6645
Added to database: 06/05/2026, 22:33:33 UTC
Last enriched: 06/13/2026, 09:48:10 UTC
Last updated: 07/31/2026, 19:24:46 UTC
Views: 88
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.