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

Published Jul 11, 2024
·
Updated

Impact

A bug in Wagtail's parsequerystring 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, parsequerystring 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 parsequerystring, it may be exploitable by other users (e.g. unauthenticated users).

Patches

Patched versions have been released as Wagtail 5.2.6, 6.0.6 and 6.1.3.

This vulnerability affects all unpatched versions from Wagtail 2.0 onwards.

Workarounds

Site owners who are unable to upgrade to a patched version can limit the length of search terms passed to parsequerystring. Whilst the performance characteristics will depend on your hosting environment, 1000 characters has been shown to still be fairly fast, without triggering this vulnerability.

No workaround is available for the Wagtail admin usage.

Acknowledgements

Many thanks to Jake Howard for reporting this issue.

For more information If you have any questions or comments about this advisory:

Visit Wagtail's support channels Email us at security@wagtail.org (view our security policy for more information).

Other sources

Wagtail is an open source content management system built on Django. A bug in Wagtail's parsequerystring 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, parsequerystring 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 parsequerystring, 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.

— MITRE

Affected Software

9 affected componentsFixes available
pip/wagtail>=2.0<5.2.6
5.2.6
pip/wagtail>=6.1<6.1.3
6.1.3
pip/wagtail>=6.0<6.0.6
6.0.6
Wagtail Wagtail>=2.0<5.2.6
Wagtail Wagtail>=6.0<6.0.6
Wagtail Wagtail>=6.1<6.1.3
Torchbox Wagtail>=2.0<5.2.6
Torchbox Wagtail>=6.0<6.0.6
Torchbox Wagtail>=6.1<6.1.3

Event History

Jul 11, 2024
Advisory Published
via GitHub·01:21 PM
CVE Published
via MITRE·03:23 PM
Data Sourced
via MITRE·03:23 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-39317?

CVE-2024-39317 has a high severity due to the potential for denial of service through long input strings.

2

How do I fix CVE-2024-39317?

To fix CVE-2024-39317, upgrade Wagtail to version 5.2.6 or 6.0.6 or later.

3

What versions of Wagtail are affected by CVE-2024-39317?

CVE-2024-39317 affects Wagtail versions from 2.0 up to 5.2.6 and from 6.0 up to 6.1.3.

4

What is the impact of CVE-2024-39317?

The impact of CVE-2024-39317 is that it can lead to increased processing times and potential denial of service.

5

Is there any workaround for CVE-2024-39317?

There are no known workarounds for CVE-2024-39317; upgrading to the patched versions is the only solution.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203