Patchfirst
CVE-2020-15118 Medium · 5.7 EPSS 1.1%

Cross-Site Scripting in Wagtail

wagtail · wagtail

Official description · CVE.org

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.

Breakdown
17.1 / 100
Exploited
Not confirmed
Reports
0
Tactics
2/15

How an attack unfolds

Based on mappings. Select a step to see the evidence.
  1. What they do

  2. What can follow

Disclosed on 20 Jul 2020. No public exploit code or confirmed exploitation is recorded.

6 fixes in wagtail over 21 months. The latest fix listed for wagtail is 2.15.2.

Fixes in wagtailPyPI package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 2.8.1CVE-2020-1100114 Apr 2020
  2. 2.9CVE-2020-1103730 Apr 2020
  3. 2.9.3CVE-2020-1511820 Jul 2020
  4. 2.12.4CVE-2021-2943419 Apr 2021
  5. 2.13.2CVE-2021-3268117 Jun 2021
  6. 2.15.2CVE-2022-2168318 Jan 2022Latest listed

techniques

2 , grouped by in kill-chain order 2

ExecutionTA0002

MITRE CTID mapping of the CVE · primary impact

CollectionTA0009

MITRE CTID mapping of the CVE · follow-on activity

Detection

0 rules for this CVE · 97 general rules for its techniques

Rules for this CVE

0 that reference CVE-2020-15118 directly.

CVE-specific rules are not available in this build. Search SigmaHQ ↗

General rules for this CVE’s techniques

These detect the technique in general, not this specific vulnerability.

Sigma rules © SigmaHQ, Detection Rule License 1.1; linked, not reproduced.

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: wagtail.

Upgrade to 2.9.3 or later

pippip install "wagtail>=2.9.3"

The first fix for CVE-2020-15118. No other CVE tracked by Patchfirst affects this package.

Affected versions, by release line

If you runUpgrade to
2.9 up to 2.9.32.9.3
2.8rc1 up to 2.9.32.9.3
All versions before 2.7.42.7.4

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

References

5 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close