Read the docs
TI-2021-12349 Aliases CVE-2021-32681GHSA-xfrw-hxr5-ghqf

Improper escaping of HTML ('Cross-site Scripting') in Wagtail StreamField blocks

Priority LOW 27CWE-79Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
Required
Attack complexity
Low
Impact type
Cross-site scripting
Confidentiality · integrity · availability
Low · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.

Summary

Wagtail is an open source content management system built on Django. A cross-site scripting vulnerability exists in versions 2.13-2.13.1, versions 2.12-2.12.4, and versions prior to 2.11.8. When the `{% include_block %}` template tag is used to output the value of a plain-text StreamField block (`CharBlock`, `TextBlock` or a similar user-defined block derived from `FieldBlock`), and that block does not specify a template for rendering, the tag output is not properly escaped as HTML. This could allow users to insert arbitrary HTML or scripting. This vulnerability is only exploitable by users with the ability to author StreamField content (i.e. users with 'editor' access to the Wagtail admin). Patched versions have been released as Wagtail 2.11.8 (for the LTS 2.11 branch), Wagtail 2.12.5, and Wagtail 2.13.2 (for the current 2.13 branch). As a workaround, site implementors who are unable to upgrade to a current supported version should audit their use of `{% include_block %}` to ensure it is not used to output `CharBlock` / `TextBlock` values with no associated template. Note that this only applies where `{% include_block %}` is used directly on that block (uses of `include_block` on a block _containing_ a CharBlock / TextBlock, such as a StructBlock, are unaffected). In these cases, the tag can be replaced with Django's `{{ ... }}` syntax - e.g. `{% include_block my_title_block %}` becomes `{{ my_title_block }}`.

Why it matters now

EPSS 0.01109 66th percentileScored 2026-11-07
Public exploit Yes 3 exploit referencesTagged by NVD
Fix Fixed wagtail (wagtail): 2.11.8wagtail (PyPI): 2.11.8, 2.12.5, 2.13.2

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
wagtailwagtailbefore 2.11.8; 2.12 – 2.12.4; 2.13 – 2.13.12.11.8Patch availableCNA
—wagtail (PyPI)before 2.11.82.11.8Patch availableGHSA-xfrw-hxr5-ghqf
—wagtail (PyPI)2.12 to before 2.12.52.12.5Patch availableGHSA-xfrw-hxr5-ghqf
—wagtail (PyPI)2.13 to before 2.13.22.13.2Patch availableGHSA-xfrw-hxr5-ghqf
  • wagtail Vendorwagtail Affected before 2.11.8; 2.12 – 2.12.4; 2.13 – 2.13.1 Fixed in 2.11.8 Patch available CNA
  • wagtail (PyPI) Vendor— Affected before 2.11.8 Fixed in 2.11.8 Patch available GHSA-xfrw-hxr5-ghqf
  • wagtail (PyPI) Vendor— Affected 2.12 to before 2.12.5 Fixed in 2.12.5 Patch available GHSA-xfrw-hxr5-ghqf
  • wagtail (PyPI) Vendor— Affected 2.13 to before 2.13.2 Fixed in 2.13.2 Patch available GHSA-xfrw-hxr5-ghqf

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:torchbox:wagtail:*:*:*:*:*:*:*:*before 2.11.8; 2.12 – 2.12.4; 2.13 – 2.13.1Vulnerablewagtail
  • cpe:2.3:a:torchbox:wagtail:*:*:*:*:*:*:*:* Versions before 2.11.8; 2.12 – 2.12.4; 2.13 – 2.13.1 Vulnerable ·wagtail

Remediation

  • Fix · CNA wagtail (wagtail) Fixed in 2.11.8
  • Fix · GHSA-xfrw-hxr5-ghqf wagtail (PyPI) Fixed in 2.11.8 Advisory →
  • Fix · GHSA-xfrw-hxr5-ghqf wagtail (PyPI) Fixed in 2.12.5 Advisory →
  • Fix · GHSA-xfrw-hxr5-ghqf wagtail (PyPI) Fixed in 2.13.2 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-32681
  2. 2026-10-03 Alias added: GHSA-xfrw-hxr5-ghqf

References

  • TI-2026-39163 Wagtail: Reflected XSS in dynamic image URL generator view CVSS 3.1HIGH 7.3
  • TI-2020-08875 Possible XSS attack in Wagtail CVSS 3.1MEDIUM 6.8
  • TI-2023-13342 Wagtail vulnerable to stored Cross-site Scripting attack via ModelAdmin views CVSS 3.1MEDIUM 6.4
  • TI-2026-32180 Wagtail: Improper restriction handling on Documents and Images API CVSS 3.1MEDIUM 5.3
  • TI-2026-22558 Wagtail: Improper escaping of HTML (Cross-site Scripting) in simple_translation admin interface CVSS 3.1MEDIUM 6.1
  • TI-2026-22557 Wagtail: Improper escaping of HTML (Cross-site Scripting) on TableBlock class attributes CVSS 3.1MEDIUM 6.1
See all 22 →

Sources