CVE-2020-15118
Cross-Site Scripting in Wagtail
Also known as GHSA-2473-9hgq-j7xw, PYSEC-2020-154
Mitigation
- Upgrade wagtail to one of 2.9.3, 2.7.4 (or later in the same release line).
Who should check
- Projects that depend on PyPI package wagtail (>= 2.8rc1, < 2.9.3)
- Anyone running wagtail < 2.7.4; >= 2.8.0, < 2.9.3
Vulnerability facts
- Affected
- wagtail >= 2.8rc1, < 2.9.3
- Fixed in
- 2.9.3, 2.7.4
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 5.7 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: High
- User interaction: Required
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: None
- EPSS
- 1.10% chance of exploitation in 30 days (percentile 65, 2026-11-26)
- CWE
- CWE-79
- Modified
Description
In Wagtail before versions 2.7.4 and 2.9.3, 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, 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.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2020-15118. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2020-15118.md Affected: wagtail >= 2.8rc1, < 2.9.3 Fixed in: 2.9.3, 2.7.4 Steps: 1. Search this machine and project for wagtail (PyPI), wagtail: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2020-15118 being exploited?
There is no confirmed exploitation: CVE-2020-15118 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.10% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2020-15118?
Medium: CVSS 5.7 (v3.1, scored by CNA). Remote, login needed. A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2020-15118?
wagtail >= 2.8rc1, < 2.9.3.
Is there a fix for CVE-2020-15118?
Yes. Fixed in 2.9.3, 2.7.4. Upgrade wagtail to one of 2.9.3, 2.7.4 (or later in the same release line).
How do I check if I'm affected by CVE-2020-15118?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.