{"id":"CVE-2024-39317","aliases":["CVE-2024-39317","GHSA-jmp3-39vp-fwg8","PYSEC-2024-86"],"related":[],"kind":"vulnerability","state":"published","title":"Wagtail regular expression denial-of-service via search query parsing","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nA bug in Wagtail's [`parse_query_string`](https://docs.wagtail.org/en/stable/topics/search/searching.html#wagtailsearch-query-string-parsing) 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.\n\nIn 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).\n\n### Patches\n\nPatched versions have been released as Wagtail 5.2.6, 6.0.6 and 6.1.3.\n\nThis vulnerability affects all unpatched versions from Wagtail 2.0 onwards.\n\n### Workarounds\n\nSite 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.\n\nNo workaround is available for the Wagtail admin usage.\n\n### Acknowledgements\n\nMany thanks to [Jake Howard](https://github.com/RealOrangeOne) for reporting this issue.\n\n### For more information\nIf you have any questions or comments about this advisory:\n\n* Visit Wagtail's [support channels](https://docs.wagtail.io/en/stable/support.html)\n* Email us at [security@wagtail.org](mailto:security@wagtail.org) (view our [security policy](https://github.com/wagtail/wagtail/security/policy) for more information).","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2024-07-11T13:21:42.000Z","modified":"2026-06-17T07:41:42.190Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H","score":4.9,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H","score":4.9,"rating":"MEDIUM"}],"cwes":["CWE-1333"],"affected":[{"ranges":[{"version":">= 2.0, < 5.2.6","status":"affected"},{"version":">= 6.0, < 6.0.6","status":"affected"},{"version":">= 6.1, < 6.1.3","status":"affected"}],"vendor":"wagtail","product":"wagtail","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"6.0","status":"affected","fixed":"6.0.6"}],"ecosystem":"PyPI","package":"wagtail","purl":"pkg:pypi/wagtail","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.1","status":"affected","fixed":"6.1.3"}],"ecosystem":"PyPI","package":"wagtail","purl":"pkg:pypi/wagtail","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.0","status":"affected","fixed":"5.2.6"}],"ecosystem":"PyPI","package":"wagtail","purl":"pkg:pypi/wagtail","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.0","fixed":"5.2.6"},{"status":"affected","introduced":"6.0","fixed":"6.0.6"},{"status":"affected","introduced":"6.1","fixed":"6.1.3"}],"vendor":"torchbox","product":"wagtail","cpe":"cpe:2.3:a:torchbox:wagtail:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"31b1e8532dfb1b70d8d37d22aff9cbde9109cdf2"},{"type":"git","status":"affected","fixed":"3c941136f79c48446e3858df46e5b668d7f83797"},{"type":"git","status":"affected","fixed":"b783c096b6d4fd2cfc05f9137a0be288850e99a2"},{"type":"ecosystem","introduced":"6.0","status":"affected","fixed":"6.0.6"},{"type":"ecosystem","introduced":"6.1","status":"affected","fixed":"6.1.3"},{"type":"ecosystem","introduced":"2.0","status":"affected","fixed":"5.2.6"}],"ecosystem":"PyPI","package":"wagtail","purl":"pkg:pypi/wagtail","repo":"https://github.com/wagtail/wagtail","source":"pysec"}],"references":[{"url":"https://github.com/wagtail/wagtail/security/advisories/GHSA-jmp3-39vp-fwg8","tags":["advisory","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/wagtail/wagtail/commit/31b1e8532dfb1b70d8d37d22aff9cbde9109cdf2","tags":["fix","patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/wagtail/wagtail/commit/3c941136f79c48446e3858df46e5b668d7f83797","tags":["fix","patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/wagtail/wagtail/commit/b783c096b6d4fd2cfc05f9137a0be288850e99a2","tags":["fix","patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39317","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/wagtail/PYSEC-2024-86.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/wagtail/wagtail","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-07-17T15:46:41.169Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-39317","url":"https://www.cve.org/CVERecord?id=CVE-2024-39317","licence":"CVE Terms of Use","modified":"2024-08-02T04:19:20.749Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jmp3-39vp-fwg8","url":"https://github.com/advisories/GHSA-jmp3-39vp-fwg8","licence":"CC-BY-4.0","modified":"2026-06-09T13:15:18.086Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-39317","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39317","licence":"Public domain","modified":"2026-06-17T07:41:42.190Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2024-86","url":"https://osv.dev/vulnerability/PYSEC-2024-86","licence":"CC-BY-4.0","modified":"2026-06-08T11:15:06.450Z"}],"updatedAt":"2026-11-25T22:58:42.788Z","epss":{"score":0.0061,"percentile":0.50573,"date":"2026-12-01T12:00:22.000Z"}}