Django versions 5.0 prior to 5.0.7 and 4.2 prior to 4.2.14 contain a denial-of-service vulnerability in the get_supported_language_variant() function. This flaw can be triggered by processing very long strings with specific characters, potentially causing a denial of service. The issue has been fixed in versions 5.0.7 and 4.2.14.