{"id":"CVE-2024-3651","aliases":["CVE-2024-3651","GHSA-jjg7-2v4v-x38h","PYSEC-2024-60"],"related":[],"kind":"vulnerability","state":"published","title":"Denial of Service via Quadratic Complexity in kjd/idna","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nA specially crafted argument to the `idna.encode()` function could consume significant resources. This may lead to a denial-of-service.\n\n### Patches\nThe function has been refined to reject such strings without the associated resource consumption in version 3.7.\n\n### Workarounds\nDomain 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.\n\n### References\n* https://huntr.com/bounties/93d78d07-d791-4b39-a845-cbfabc44aadb","format":"markdown","source":"ghsa"},{"lang":"es","text":"Se identificó una vulnerabilidad en la librería kjd/idna, específicamente dentro de la función `idna.encode()`, afectando a la versión 3.6. El problema surge del manejo por parte de la función de cadenas de entrada manipuladas, lo que puede generar complejidad cuadrática y, en consecuencia, una condición de denegación de servicio. Esta vulnerabilidad se activa por una entrada manipulada que hace que la función `idna.encode()` procese la entrada con una carga computacional considerable, aumentando significativamente el tiempo de procesamiento de manera cuadrática en relación con el tamaño de la entrada.","source":"nvd"}],"published":"2024-04-11T21:32:40.000Z","modified":"2026-09-10T03:50:12.774Z","severity":{"scorer":"@huntr_ai","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":6.2,"rating":"MEDIUM"},"severities":[{"scorer":"@huntr_ai","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":6.2,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":6.2,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-400","CWE-1333"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"3.7","status":"affected"}],"vendor":"kjd","product":"kjd/idna","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.7"}],"ecosystem":"PyPI","package":"idna","purl":"pkg:pypi/idna","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"0.2","fixed":"3.7"}],"vendor":"kjd","product":"internationalized_domain_names_in_applications","cpe":"cpe:2.3:a:kjd:internationalized_domain_names_in_applications:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"1d365e17e10d72d0b7876316fc7b9ca0eebdd38d"},{"type":"ecosystem","introduced":"0.1","status":"affected","fixed":"3.7"}],"ecosystem":"PyPI","package":"idna","purl":"pkg:pypi/idna","repo":"https://github.com/kjd/idna","source":"pysec"}],"references":[{"url":"https://huntr.com/bounties/93d78d07-d791-4b39-a845-cbfabc44aadb","tags":["evidence","exploit","fix","patch","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/kjd/idna/commit/1d365e17e10d72d0b7876316fc7b9ca0eebdd38d","tags":["fix","patch","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/05/msg00006.html","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/F2S5E23N6E52S46KGNYTDFB75LOC4N4D/","tags":[],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S5IDLLD2IKSIVRBSLB34WTSYGLMWUFWF/","tags":[],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ULSC7HBJKXB3BZV367WM5BR6DFEC4Z43/","tags":[],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4YQUPYH3SVZ5GFF2CDQ55FCM575AZTF2/","tags":[],"sources":["cvelist","nvd"]},{"url":"https://github.com/kjd/idna/security/advisories/GHSA-jjg7-2v4v-x38h","tags":["web"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-3651","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/kjd/idna","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/idna/PYSEC-2024-60.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4YQUPYH3SVZ5GFF2CDQ55FCM575AZTF2","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/F2S5E23N6E52S46KGNYTDFB75LOC4N4D","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S5IDLLD2IKSIVRBSLB34WTSYGLMWUFWF","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ULSC7HBJKXB3BZV367WM5BR6DFEC4Z43","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-jjg7-2v4v-x38h","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"@huntr_ai","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-07-07T19:07:43.737Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-3651","url":"https://www.cve.org/CVERecord?id=CVE-2024-3651","licence":"CVE Terms of Use","modified":"2025-11-04T22:06:20.751Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jjg7-2v4v-x38h","url":"https://github.com/advisories/GHSA-jjg7-2v4v-x38h","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:12.774Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-3651","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-3651","licence":"Public domain","modified":"2026-06-17T07:44:44.377Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2024-60","url":"https://osv.dev/vulnerability/PYSEC-2024-60","licence":"CC-BY-4.0","modified":"2026-06-10T17:01:21.102Z"}],"updatedAt":"2026-11-25T22:58:42.547Z","epss":{"score":0.01386,"percentile":0.73025,"date":"2026-12-01T12:00:22.000Z"}}