CVE-2021-29434: Improper validation of URLs ('Cross-site Scripting') in Wagtail rich text fields
6.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.50524%
CWE
Published
4/20/2021
Updated
11/19/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
wagtail | pip | >= 2.12, <= 2.12.3 | 2.12.4 |
wagtail | pip | <= 2.11.6 | 2.11.7 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from missing URL protocol validation in the rich text content conversion process. The patch adds wagtail.core.whitelist.check_url validation to the link_entity function, which handles external link processing. The pre-patch version in contentstate.py directly assigned props.get('url') without validation, making this function the injection point. The diff shows this was the only modification required to fix the XSS vulnerability, confirming this function's critical role in the security flaw.