From 68917f1c97124463dd7b2a417a36ed3ed5bc2785 Mon Sep 17 00:00:00 2001
From: Matt Westcott <matt@west.co.tt>
Date: Thu, 11 Jul 2024 11:09:16 +0200
Subject: [PATCH] Release note for CVE-2024-39317 in 5.2.6

---
 CHANGELOG.txt          | 1 +
 docs/releases/5.2.6.md | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index ccac35e74c..654f432c00 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -4,6 +4,7 @@ Changelog
 5.2.6 (xx.xx.xxxx) - IN DEVELOPMENT
 ~~~~~~~~~~~~~~~~~~
 
+ * Fix: CVE-2024-39317: Regular expression denial-of-service via search query parsing (Jake Howard)
  * Fix: Fix image preview when Willow optimizers are enabled (Alex Tomkins)
  * Maintenance: Remove django-pattern-library upper bound in testing dependencies (Sage Abdullah)
 
diff --git a/docs/releases/5.2.6.md b/docs/releases/5.2.6.md
index d47a0dd4de..e17b851edb 100644
--- a/docs/releases/5.2.6.md
+++ b/docs/releases/5.2.6.md
@@ -11,6 +11,15 @@ depth: 1
 
 ## What's new
 
+### CVE-2024-39317: Regular expression denial-of-service via search query parsing
+
+This release addresses a denial-of-service vulnerability in Wagtail. A bug in Wagtail's [`parse_query_string`](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.
+
+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).
+
+Many thanks to Jake Howard for reporting and fixing this issue. For further details, please see [the CVE-2024-39317 security advisory](https://github.com/wagtail/wagtail/security/advisories/GHSA-jmp3-39vp-fwg8).
+
+
 ### Bug fixes
 
  * Fix image preview when Willow optimizers are enabled (Alex Tomkins)