Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
MEDIUM severity

GHSA-xfrw-hxr5-ghqf

MEDIUM

GHSA-xfrw-hxr5-ghqf is a medium-severity (CVSS 5.4) Cross-site Scripting (XSS) vulnerability in wagtail. 3 public exploit references exist, so weaponization risk is real. O3 Security confirms whether GHSA-xfrw-hxr5-ghqf is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

Cross-site Scripting in wagtail

Also known asCVE-2021-32681PYSEC-2021-103
Published
Jun 17, 2021
Updated
Jul 8, 2026
Affected
3 pkgs
Patched
3 / 3
Exploits
3 known
Exploitation data as of Jul 8, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Real-World Exposure

3 pkgs affected
🐍wagtail🐍wagtail🐍wagtail

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

Impact

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).

Patches

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).

Site implementors who wish to retain the existing behaviour of allowing editors to insert HTML content in these blocks (and are willing to accept the risk of untrusted editors inserting arbitrary code) may disable the escaping by surrounding the relevant {% include_block %} tag in {% autoescape off %}...{% endautoescape %}.

Workarounds

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 }}.

Acknowledgements

Many thanks to Karen Tracey for reporting this issue.

For more information

If you have any questions or comments about this advisory:

Affected Packages

3 total 3 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIwagtailall versions2.11.8
🐍PyPIwagtail2.12&&< 2.12.52.12.5
🐍PyPIwagtail2.13&&< 2.13.22.13.2
Exploits & PoCs
3

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for wagtail. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update wagtail to 2.11.8 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-xfrw-hxr5-ghqf is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-xfrw-hxr5-ghqf is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-xfrw-hxr5-ghqf. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Impact 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). ### Patches Patched versions have been released as Wagtail 2.11.8 (for the LT
O3 Security · Impact-Aware SCA

Is GHSA-xfrw-hxr5-ghqf in your dependencies?

O3 detects GHSA-xfrw-hxr5-ghqf across PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.

GHSA-xfrw-hxr5-ghqf: Cross-site Scripting in… | O3 Security