# CVE-2024-3651: Denial of Service via Quadratic Complexity in kjd/idna

- Severity: Medium 6.2 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.39%, higher than 73% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-04-11T21:32:40.000Z
- Modified: 2026-09-10T03:50:12.774Z
- Also known as: GHSA-jjg7-2v4v-x38h, PYSEC-2024-60
- Weaknesses: CWE-400, CWE-1333
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: @huntr_ai

## Description

A vulnerability was identified in the kjd/idna library, specifically within the `idna.encode()` function, affecting version 3.6. The issue arises from the function's handling of crafted input strings, which can lead to quadratic complexity and consequently, a denial of service condition. This vulnerability is triggered by a crafted input that causes the `idna.encode()` function to process the input with considerable computational load, significantly increasing the processing time in a quadratic manner relative to the input size.

(As written by CVE List.)

## Affected

- kjd kjd/idna: from unspecified before 3.7
- idna (PyPI): before 3.7; before 1d365e17e10d72d0b7876316fc7b9ca0eebdd38d; from 0.1 before 3.7
- kjd internationalized_domain_names_in_applications: from 0.2 before 3.7

## Every score

- @huntr_ai: CVSS:3.0 6.2 Medium `CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 6.2 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:4.0 Medium `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`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- PyPA Advisory Database: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://huntr.com/bounties/93d78d07-d791-4b39-a845-cbfabc44aadb> (exploit, evidence, fix, patch, web)
- <https://github.com/kjd/idna/commit/1d365e17e10d72d0b7876316fc7b9ca0eebdd38d> (fix, patch, web)
- <https://lists.debian.org/debian-lts-announce/2024/05/msg00006.html> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/F2S5E23N6E52S46KGNYTDFB75LOC4N4D/>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S5IDLLD2IKSIVRBSLB34WTSYGLMWUFWF/>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ULSC7HBJKXB3BZV367WM5BR6DFEC4Z43/>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4YQUPYH3SVZ5GFF2CDQ55FCM575AZTF2/>
- <https://github.com/kjd/idna/security/advisories/GHSA-jjg7-2v4v-x38h> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-3651> (advisory)
- <https://github.com/kjd/idna> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/idna/PYSEC-2024-60.yaml> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4YQUPYH3SVZ5GFF2CDQ55FCM575AZTF2> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/F2S5E23N6E52S46KGNYTDFB75LOC4N4D> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S5IDLLD2IKSIVRBSLB34WTSYGLMWUFWF> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ULSC7HBJKXB3BZV367WM5BR6DFEC4Z43> (web)
- <https://github.com/advisories/GHSA-jjg7-2v4v-x38h> (advisory)

## Sources

- CVE List: [CVE-2024-3651](https://www.cve.org/CVERecord?id=CVE-2024-3651), CVE Terms of Use, modified 2025-11-04
- GitHub Advisory Database: [GHSA-jjg7-2v4v-x38h](https://github.com/advisories/GHSA-jjg7-2v4v-x38h), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2024-3651](https://nvd.nist.gov/vuln/detail/CVE-2024-3651), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2024-60](https://osv.dev/vulnerability/PYSEC-2024-60), CC-BY-4.0, modified 2026-06-10

---

Page: https://cve.day/CVE-2024-3651 · Whole record: https://cve.day/CVE-2024-3651.json · Rebuilt by cve.day 2026-11-25T22:58:42.547Z
