The vulnerability is a denial-of-service in the idna library, where functions like idna.encode() could be forced to consume excessive CPU resources when processing specially crafted long strings. This issue is a bypass of a previous fix for CVE-2024-3651. The core of the problem lies in the check_label function, which, prior to the fix, would perform computationally expensive validation checks (in functions like valid_contexto and valid_contextj) before validating the input's length. This allowed an attacker to cause a denial of service by providing a very long string that would trigger a quadratic-time validation process.
The patch, released in version 3.15, addresses this by adding an early length check in idna.core.check_label. This function is a dependency for several other public-facing functions, including idna.core.alabel, idna.core.ulabel, and the idna2008 codec's IncrementalEncoder.encode. The analysis of the patch commits confirms that these functions were the vectors for the vulnerability. During an exploit, a runtime profile would likely show significant time spent in valid_contexto and valid_contextj, called from check_label, which in turn is called from one of the higher-level API functions.