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 package | Versions | Reported by |
|---|---|---|
| wagtail wagtail | >= 2.0, < 5.2.6, >= 6.0, < 6.0.6, >= 6.1, < 6.1.3 | CVE 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 b783c096b6d4fd2cfc05f9137a0be288850e99a2 | GitHub Advisory Database, PyPA Advisory Database |
| torchbox wagtail | from 2.0 before 5.2.6, from 6.0 before 6.0.6, from 6.1 before 6.1.3 | NVD |
All scores
| GitHub_M | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 6.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| NVD | 4.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H |
| PyPA Advisory Database | 4.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H |
Classification
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:
- Visit Wagtail's support channels
- Email us at security@wagtail.org (view our security policy for more information).
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-39317 changed 2024-08-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-jmp3-39vp-fwg8 changed 2026-06-09 | CC-BY-4.0 |
| NVD | CVE-2024-39317 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2024-86 changed 2026-06-08 | CC-BY-4.0 |