CVE-2021-29434
Python vulnerability analysis and mitigation

Overview

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).

Technical details

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).

Impact

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).

Mitigation and workarounds

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).

Community reactions

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).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66423HIGH7.1
  • PythonPython
  • tryton-server
NoYesNov 30, 2025
CVE-2025-66454MEDIUM6.5
  • PythonPython
  • arcade-mcp-server
NoYesDec 02, 2025
CVE-2025-66424MEDIUM6.5
  • PythonPython
  • trytond
NoYesNov 30, 2025
CVE-2025-66422MEDIUM4.3
  • PythonPython
  • tryton-server
NoYesNov 30, 2025
CVE-2025-65858LOW3.5
  • PythonPython
  • calibreweb
NoNoDec 02, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management