CVE-2022-21683: Comment reply notifications sent to incorrect users
3.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.4462%
CWE
Published
1/21/2022
Updated
11/19/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
wagtail | pip | >= 2.13, < 2.15.2 | 2.15.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the thread_users query in send_commenting_notifications. The pre-patch code used:
- .exclude(Q(comment_replies__isnull=True) & Q(comments__isnull=True)) which incorrectly included all users who had ever commented anywhere. The patched version replaces this with:
- .filter(Q(comment_replies__comment_id__in=relevant_comment_ids) | Q(comments__pk__in=relevant_comment_ids)) restricting to actual thread participants. The test additions in test_edit_page.py verify this by ensuring users with comments on unrelated pages (never_emailed_user) are excluded from notifications.