Quick answers
- Is CVE-2021-32681 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2021-32681 being exploited in the wild.
- How severe is CVE-2021-32681?
- Medium severity, with a CVSS score of 5.4, published 17 June 2021.
- Which products and versions are affected?
- wagtail (PyPI) ECOSYSTEM:introduced=0,fixed=2.11.8, ECOSYSTEM:introduced=0,fixed=2.11.8,introduced=2.12,fixed=2.12.5,introduced=2.13,fixed=2.13.2; Wagtail < 2.11.8, >= 2.12 < 2.12.5, >= 2.13 < 2.13.2.
- Is there a fix for CVE-2021-32681?
- Yes. wagtail (PyPI): upgrade to 2.11.8, 2.13.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2021-32681 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2021-32681?
- Check whether you run wagtail (PyPI) or Wagtail at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- wagtail (PyPI): upgrade to 2.11.8, 2.13.2 or later
pip install "wagtail>=2.13.2"
Technical details
A stored cross-site scripting (XSS) vulnerability exists in Wagtail's StreamField component. When the '{% include_block %}' template tag is used to render plain-text blocks like 'CharBlock' or 'TextBlock' without a specific rendering template, the output is not properly HTML-escaped. An attacker with 'editor' access can input malicious scripts into these fields, which are then executed when the content is viewed by others. The issue is rooted in the 'FieldBlock' class and its derivatives. Patches are available in versions 2.11.8, 2.12.5, and 2.13.2.
Affected products
- Wagtail Wagtail < 2.11.8, >= 2.12 < 2.12.5, >= 2.13 < 2.13.2
Identifiers
- CVE-2021-32681
- GHSA-xfrw-hxr5-ghqf
- PYSEC-2021-103
Timeline
- 2021-06-17: disclosed
- 2021-06-17: advisory
- 2021-06-17: patched
References
- https://github.com/wagtail/wagtail/security/advisories/GHSA-xfrw-hxr5-ghqf
- https://github.com/wagtail/wagtail/releases/tag/v2.11.8
- https://github.com/wagtail/wagtail/releases/tag/v2.12.5
- https://github.com/wagtail/wagtail/releases/tag/v2.13.2
- https://github.com/pypa/advisory-database/tree/main/vulns/wagtail/PYSEC-2021-103.yaml