
Cloud Vulnerability DB
A community-led vulnerabilities database
Wagtail, a Django content management system, was found to have a Cross-site Scripting (XSS) vulnerability (CVE-2021-29434) in its rich text fields. When saving contents in the admin interface, Wagtail did not properly validate link URLs on the server side, allowing malicious users with admin access to craft POST requests containing javascript: URLs with arbitrary code. This vulnerability affected versions prior to 2.11.7 and versions 2.12.0 through 2.12.3. The issue was discovered and reported in April 2021 (GitHub Advisory).
The vulnerability stems from insufficient server-side validation of URLs in rich text fields. When processing link URLs, the application failed to properly validate the protocol, allowing javascript: URLs to be saved. This could lead to stored XSS attacks if a malicious user with admin access crafted a POST request containing malicious JavaScript code. The vulnerability has been assigned a CVSS v3.1 base score of 6.1 MEDIUM (Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N) (GitHub Advisory).
The vulnerability could allow authenticated users with admin interface access to inject malicious JavaScript code that would execute when other users view the affected content. This could potentially lead to account hijacking and unauthorized actions performed on behalf of other users who view the compromised content (Immersive Labs).
The vulnerability was patched in Wagtail versions 2.11.7 (LTS branch) and 2.12.4. For sites unable to upgrade, a workaround is available by adding custom code to the wagtailhooks.py module to implement proper URL validation. The patch involves registering a custom link entity handler that uses the checkurl function to validate URLs before saving (GitHub Advisory).
The vulnerability was responsibly disclosed by security researcher Kevin Breen, and the Wagtail team promptly addressed the issue by releasing patched versions. The discovery highlighted the importance of server-side validation for user-supplied URLs, even in authenticated admin interfaces (Immersive Labs).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."