Loading advisory.
Loading advisory.
Cross-Site Scripting in Wagtail
When a form page type is made available to Wagtail editors through the wagtail.contrib.forms app, and the page template is built using Django's standard form rendering helpers such as form.as_p (as directed in the documentation), any HTML tags used within a form field's help text will be rendered…
Published 2020-07-20 17:50 UTC · Modified 2026-09-10 03:48 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| wagtail | PyPI | >= 2.8rc1, < 2.9.3 < 2.7.4 git commits in https://github.com/wagtail/wagtail: < d9a41e7f24d08c024acc9a3094940199df94db34 >= 2.7, < 2.7.4 >= 2.9, < 2.9.3 versions 2.8, 2.8.1, 2.8.2, 2.8rc1, 2.9, 2.9.1, 2.9.2, 2.9rc1, 0.1, 0.2, 0.3, 0.3.1, 0.4, 0.4.1, 0.5, 0.6, 0.7, 0.8, 0.8.1, 0.8.10 and 103 more | 2.9.3, 2.7.4, d9a41e7f24d08c024acc9a3094940199df94db34 | pip install --upgrade 'wagtail>=2.9.3'pip install --upgrade 'wagtail>=2.7.4'pip install --upgrade 'wagtail>=d9a41e7f24d08c024acc9a3094940199df94db34' |
When a form page type is made available to Wagtail editors through the wagtail.contrib.forms app, and the page template is built using Django's standard form rendering helpers such as form.as_p (as directed in the documentation), any HTML tags used within a form field's help text will be rendered unescaped in the page. Allowing HTML within help text is an intentional design decision by Django; however, as a matter of policy Wagtail does not allow editors to insert arbitrary HTML by default, as this could potentially be used to carry out cross-site scripting attacks, including privilege escalation. This functionality should therefore not have been made available to editor-level users.
The vulnerability is not exploitable by an ordinary site visitor without access to the Wagtail admin.
Patched versions have been released as Wagtail 2.7.4 (for the LTS 2.7 branch) and Wagtail 2.9.3 (for the current 2.9 branch). In these versions, help text will be escaped to prevent the inclusion of HTML tags. Site owners who wish to re-enable the use of HTML within help text (and are willing to accept the risk of this being exploited by editors) may set WAGTAILFORMS_HELP_TEXT_ALLOW_HTML = True in their configuration settings.
Site owners who are unable to upgrade to the new versions can secure their form page templates by rendering forms field-by-field as per Django's documentation, but omitting the |safe filter when outputting the help text.
Many thanks to Timothy Bautista for reporting this issue.
If you have any questions or comments about this advisory:
Visit Wagtail's support channels
Email us at security@wagtail.io (if you wish to send encrypted email, the public key ID is 0x6ba1e1a86e0f8ce8)
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
One EPSS score on record: 0.011 on 2026-11-24.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.011 | first score | v2026.06.15 |