CVE-2024-39317
JSON

6.5medium

Wagtail regular expression denial-of-service via search query parsing

Severity
6.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.61% (higher than 50% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-jmp3-39vp-fwg8PYSEC-2024-86

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.

Affected

Product or packageVersionsReported by
wagtail wagtail>= 2.0, < 5.2.6, >= 6.0, < 6.0.6, >= 6.1, < 6.1.3CVE List
wagtail (PyPI)from 6.0 before 6.0.6, from 6.1 before 6.1.3, from 2.0 before 5.2.6, before 31b1e8532dfb1b70d8d37d22aff9cbde9109cdf2, before 3c941136f79c48446e3858df46e5b668d7f83797, before b783c096b6d4fd2cfc05f9137a0be288850e99a2GitHub Advisory Database, PyPA Advisory Database
torchbox wagtailfrom 2.0 before 5.2.6, from 6.0 before 6.0.6, from 6.1 before 6.1.3NVD

All scores

GitHub_M6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
GitHub6.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
NVD4.9medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H
PyPA Advisory Database4.9medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-1333

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
Impact

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).

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 parse_query_string. 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:

NVD (es)

Wagtail es un sistema de gestión de contenidos de código abierto construido sobre Django. Un error en `parse_query_string` de Wagtail provocaría que se tardara mucho en procesar las entradas adecuadamente manipuladas. Cuando se utiliza para analizar cadenas de caracteres suficientemente largas sin espacios, `parse_query_string` tardaría una cantidad de tiempo inesperadamente grande en procesarse, lo que provocaría una denegación de servicio. En una instalación inicial de Wagtail, cualquier usuario administrador de Wagtail puede aprovechar la vulnerabilidad. No puede ser explotado por los usuarios finales. Si su sitio Wagtail tiene una implementación de búsqueda personalizada que utiliza `parse_query_string`, otros usuarios pueden explotarla (por ejemplo, usuarios no autenticados). Se han lanzado versiones parcheadas como Wagtail 5.2.6, 6.0.6 y 6.1.3.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-39317 changed 2024-08-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-jmp3-39vp-fwg8 changed 2026-06-09CC-BY-4.0
NVDCVE-2024-39317 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2024-86 changed 2026-06-08CC-BY-4.0