CVE-2024-39317 Wagtail regular expression denial-of-service via search query parsing

Medium 6.5 Published Updated

Attackers can cause denial of service in Wagtail CMS by submitting crafted search queries that trigger excessive processing time in the query parser.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-39317?

CVE-2024-39317 is a medium-severity denial of service vulnerability in wagtail, published on 11 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Wagtail is an open source content management system built on Django. A bug in Wagtail's `parse_query_string` would result in it taking a long time to process suitably crafted inputs. When used to parse sufficiently long strings of characters without a space, `parse_query_string` would take an unexpectedly large amount of time to process, resulting in a denial of service. In an initial Wagtail installation, the vulnerability can be exploited by any Wagtail admin user. It cannot be exploited by end users. If your Wagtail site has a custom search implementation which uses `parse_query_string`, it may be exploitable by other users (e.g. unauthenticated users). Patched versions have been released as Wagtail 5.2.6, 6.0.6 and 6.1.3.

Weakness: CWE-1333

Which versions are affected by CVE-2024-39317?

7 open source packages ship an affected version, including wagtail. It affects 1 product.

PackageAffectedFixed in
wagtail PyPIFrom 2.05.2.6
wagtail PyPIFrom 2.05.2.6
wagtail PyPIFrom 6.06.0.6, 6.1.3, 5.2.6
wagtail PyPIFrom 6.06.0.6
wagtail PyPIFrom 6.06.0.6
wagtail PyPIFrom 6.16.1.3
1 more packages
wagtail PyPIFrom 6.16.1.3

Products include Torchbox Wagtail.

How do I fix CVE-2024-39317?

Upgrade wagtail to a fixed version for your release line: 5.2.6, 6.0.6 or 6.1.3.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2024-39317 being exploited?

There is no known exploitation of CVE-2024-39317 in the wild and no public exploit code.

Sources

Also known as GHSA-jmp3-39vp-fwg8, PYSEC-2024-86, ROOT-APP-PYPI-CVE-2024-39317.

Is CVE-2024-39317 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free