CVE-2024-39317
Python vulnerability analysis and mitigation

Overview

CVE-2024-39317 affects Wagtail, an open source content management system built on Django. The vulnerability was discovered in Wagtail's parse_query_string function, which could result in a denial of service when processing specially crafted inputs. The issue affects all versions from Wagtail 2.0 up to (excluding) 5.2.6, versions 6.0 to (excluding) 6.0.6, and versions 6.1 to (excluding) 6.1.3 (GitHub Advisory).

Technical details

The vulnerability stems from inefficient regular expression complexity (CWE-1333) in the parse_query_string function. When parsing sufficiently long strings of characters without a space, the function would take an unexpectedly large amount of time to process. The issue has a CVSS v3.1 base score of 6.5 (Medium) with vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H (GitHub Advisory).

Impact

The vulnerability can lead to a denial of service condition when processing specially crafted search queries. In a default Wagtail installation, the vulnerability can be exploited by any Wagtail admin user but cannot be exploited by end users. However, if a Wagtail site has a custom search implementation using parse_query_string, it may be exploitable by other users, including unauthenticated users (GitHub Advisory).

Exploitability

The vulnerability requires low attack complexity and can be exploited remotely. It requires low privileges (authenticated admin user in default installations) and no user interaction for successful exploitation (GitHub Advisory).

Mitigation and workarounds

Patched versions have been released as Wagtail 5.2.6, 6.0.6, and 6.1.3. For sites unable to upgrade immediately, a workaround is available by limiting the length of search terms passed to parse_query_string. A limit of 1000 characters has been shown to be effective without triggering the vulnerability. However, this workaround is not available for Wagtail admin usage (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66455CRITICAL9.8
  • Python logoPython
  • lmdeploy
NoYesSep 18, 2026
CVE-2026-63374CRITICAL9.3
  • Python logoPython
  • airflow-3
NoYesSep 18, 2026
CVE-2026-59163CRITICAL9.1
  • Python logoPython
  • mnemosyne-memory
NoYesSep 18, 2026
CVE-2026-33625HIGH8.8
  • Python logoPython
  • lmdeploy
NoYesSep 18, 2026
CVE-2026-64847MEDIUM6.8
  • Python logoPython
  • py3-anyio
NoYesSep 18, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management