Vulnerability · Published Jul 7, 2024 · Assigned by @huntr_ai

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

Medium 6.2

In plain English

A medium-severity regular-expression denial of service in kjd/idna from kjd. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.4% (higher than 72% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.0)6.2Medium
Exploit odds (30 days)1.4%top 27.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack tooling1Public PoC

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8python3-idna2.5-7.el8_10ALSA-2024:4260
AlmaLinux:9python3-idna2.10-7.el9_4.1ALSA-2024:3846
AlmaLinux:8python393.9.19-1.module_el8.10.0+3849+a48d89aaALSA-2024:3466
AlmaLinux:8python39-Cython0.29.21-5.module_el8.6.0+3248+c431e88cALSA-2024:3466
AlmaLinux:8python39-Cython0.29.21-5.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-PyMySQL0.10.1-2.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-attrs20.3.0-2.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-cffi1.14.3-2.module_el8.6.0+3248+c431e88cALSA-2024:3466
AlmaLinux:8python39-cffi1.14.3-2.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-chardet3.0.4-19.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-cryptography3.3.1-3.module_el8.10.0+3765+2f9a457dALSA-2024:3466
AlmaLinux:8python39-debug3.9.19-1.module_el8.10.0+3849+a48d89aaALSA-2024:3466
AlmaLinux:8python39-devel3.9.19-1.module_el8.10.0+3849+a48d89aaALSA-2024:3466
AlmaLinux:8python39-idle3.9.19-1.module_el8.10.0+3849+a48d89aaALSA-2024:3466
AlmaLinux:8python39-idna2.10-4.module_el8.10.0+3849+a48d89aaALSA-2024:3466
AlmaLinux:8python39-iniconfig1.1.1-2.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-libs3.9.19-1.module_el8.10.0+3849+a48d89aaALSA-2024:3466
AlmaLinux:8python39-lxml4.6.5-1.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-lxml4.6.5-1.module_el8.6.0+3248+c431e88cALSA-2024:3466
AlmaLinux:8python39-mod_wsgi4.7.1-7.module_el8.9.0+3634+fb2a896cALSA-2024:3466
AlmaLinux:8python39-more-itertools8.5.0-2.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-numpy1.19.4-3.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-numpy1.19.4-3.module_el8.6.0+3248+c431e88cALSA-2024:3466
AlmaLinux:8python39-numpy-doc1.19.4-3.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-numpy-f2py1.19.4-3.module_el8.6.0+3248+c431e88cALSA-2024:3466
AlmaLinux:8python39-numpy-f2py1.19.4-3.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-packaging20.4-4.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-pip20.2.4-9.module_el8.10.0+3765+2f9a457dALSA-2024:3466
AlmaLinux:8python39-pip-wheel20.2.4-9.module_el8.10.0+3765+2f9a457dALSA-2024:3466
AlmaLinux:8python39-pluggy0.13.1-3.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-ply3.11-10.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-psutil5.8.0-4.module_el8.6.0+3248+c431e88cALSA-2024:3466
AlmaLinux:8python39-psutil5.8.0-4.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-psycopg22.8.6-3.module_el8.10.0+3765+2f9a457dALSA-2024:3466
AlmaLinux:8python39-psycopg2-doc2.8.6-3.module_el8.10.0+3765+2f9a457dALSA-2024:3466
AlmaLinux:8python39-psycopg2-tests2.8.6-3.module_el8.10.0+3765+2f9a457dALSA-2024:3466
AlmaLinux:8python39-py1.10.0-1.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-pybind112.7.1-1.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-pybind112.7.1-1.module_el8.6.0+3248+c431e88cALSA-2024:3466
AlmaLinux:8python39-pybind11-devel2.7.1-1.module_el8.6.0+3248+c431e88cALSA-2024:3466
AlmaLinux:8python39-pybind11-devel2.7.1-1.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-pycparser2.20-3.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-pyparsing2.4.7-5.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-pysocks1.7.1-4.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-pytest6.0.2-2.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-pyyaml5.4.1-1.module_el8.6.0+3248+c431e88cALSA-2024:3466
AlmaLinux:8python39-pyyaml5.4.1-1.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-requests2.25.0-3.module_el8.9.0+3634+fb2a896cALSA-2024:3466
AlmaLinux:8python39-rpm-macros3.9.19-1.module_el8.10.0+3849+a48d89aaALSA-2024:3466
AlmaLinux:8python39-scipy1.5.4-5.module_el8.9.0+3634+fb2a896cALSA-2024:3466
AlmaLinux:8python39-setuptools50.3.2-5.module_el8.10.0+3765+2f9a457dALSA-2024:3466
AlmaLinux:8python39-setuptools-wheel50.3.2-5.module_el8.10.0+3765+2f9a457dALSA-2024:3466
AlmaLinux:8python39-six1.15.0-3.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-test3.9.19-1.module_el8.10.0+3849+a48d89aaALSA-2024:3466
AlmaLinux:8python39-tkinter3.9.19-1.module_el8.10.0+3849+a48d89aaALSA-2024:3466
AlmaLinux:8python39-toml0.10.1-5.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-urllib31.25.10-5.module_el8.10.0+3765+2f9a457dALSA-2024:3466
AlmaLinux:8python39-wcwidth0.2.5-3.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-wheel1:0.35.1-4.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-wheel-wheel1:0.35.1-4.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
Alpine:v3.20py3-idna3.7-r0ALPINE-CVE-2024-3651
Alpine:v3.21py3-idna3.7-r0ALPINE-CVE-2024-3651
Alpine:v3.22py3-idna3.7-r0ALPINE-CVE-2024-3651
Alpine:v3.23py3-idna3.7-r0ALPINE-CVE-2024-3651
Alpine:v3.24py3-idna3.7-r0ALPINE-CVE-2024-3651
Debian:12python-idna3.3-1+deb12u1DEBIAN-CVE-2024-3651
Debian:13python-idna3.6-2.1DEBIAN-CVE-2024-3651
Debian:14python-idna3.6-2.1DEBIAN-CVE-2024-3651
PyPIidna3.7PYSEC-2024-60
PyPIidna3.7GHSA-jjg7-2v4v-x38h
Rocky Linux:8python-idna0:2.5-7.el8_10RLSA-2024:4260
Rocky Linux:9python-idna0:2.10-7.el9_4.1RLSA-2024:3846
Ubuntu:22.04:LTSpython-idna3.3-1ubuntu0.1USN-6780-1
Ubuntu:22.04:LTSpython-idna3.3-1ubuntu0.1UBUNTU-CVE-2024-3651
Ubuntu:24.04:LTSpython-idna3.6-2ubuntu0.1UBUNTU-CVE-2024-3651
Ubuntu:24.04:LTSpython-idna3.6-2ubuntu0.1USN-6780-1
Ubuntu:22.04:LTSpython-pip22.0.2+dfsg-1ubuntu0.7USN-7762-1
Ubuntu:22.04:LTSpython-pip22.0.2+dfsg-1ubuntu0.7UBUNTU-CVE-2024-3651
Ubuntu:24.04:LTSpython-pip24.0+dfsg-1ubuntu1.3UBUNTU-CVE-2024-3651
Ubuntu:24.04:LTSpython-pip24.0+dfsg-1ubuntu1.3USN-7762-1

Affected products (as reported)

VendorProductVersions
kjd kjd/idna unspecified – before 3.7

Weakness: CWE-1333 · Vector: CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References