CVE-2026-28222
Wagtail: Improper escaping of HTML (Cross-site Scripting) on TableBlock class attributes
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- High
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.1
Wagtail: Improper escaping of HTML (Cross-site Scripting) on TableBlock class attributes
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.
- Record
CVE-2026-28222- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
EUVDEUVD-2026-9858
6.1
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.
- Record
EUVD-2026-9858- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-p5cm-246w-84jm
6.1
Wagtail Vulnerable to Cross-site Scripting in TableBlock class attributes
Impact
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.
Patches
Patched versions have been released as Wagtail 6.3.8, 7.0.6, 7.2.3 and 7.3.1.
Workarounds
Site owners who are unable to upgrade to the new versions can remediate the vulnerability by setting a template attribute on all TableBlock definitions, referencing a template that does not output class attributes. For example:
<!-- For use with TableBlock(template="path/to/table_block.html") -->
<table>
{% if table_caption %}
<caption>{{ table_caption }}</caption>
{% endif %}
{% if table_header %}
<thead>
<tr>
{% for cell in table_header %}
<th scope="col">{{ cell }}</th>
{% endfor %}
</tr>
</thead>
{% endif %}
<tbody>
{% for row in data %}
<tr>
{% for cell in row %}
{% if first_col_is_header and forloop.first %}
<th scope="row">{{ cell }}</th>
{% else %}
<td>{{ cell }}</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
Acknowledgements
Many thanks to Guan Chenxian (@GCXWLP) for reporting this issue.
For more information
If there are any questions or comments about this advisory:
- Visit Wagtail's support channels
- Email Wagtail at [email protected] (view the security policy for more information).
- Record
GHSA-p5cm-246w-84jm- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
NVD
6.1
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.
- Record
CVE-2026-28222- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSV
6.1
Wagtail: Improper escaping of HTML (Cross-site Scripting) on TableBlock class attributes
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.
- Record
CVE-2026-28222- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVGHSA-p5cm-246w-84jm
6.1
Wagtail Vulnerable to Cross-site Scripting in TableBlock class attributes
Impact
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.
Patches
Patched versions have been released as Wagtail 6.3.8, 7.0.6, 7.2.3 and 7.3.1.
Workarounds
Site owners who are unable to upgrade to the new versions can remediate the vulnerability by setting a template attribute on all TableBlock definitions, referencing a template that does not output class attributes. For example:
<!-- For use with TableBlock(template="path/to/table_block.html") -->
<table>
{% if table_caption %}
<caption>{{ table_caption }}</caption>
{% endif %}
{% if table_header %}
<thead>
<tr>
{% for cell in table_header %}
<th scope="col">{{ cell }}</th>
{% endfor %}
</tr>
</thead>
{% endif %}
<tbody>
{% for row in data %}
<tr>
{% for cell in row %}
{% if first_col_is_header and forloop.first %}
<th scope="row">{{ cell }}</th>
{% else %}
<td>{{ cell }}</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
Acknowledgements
Many thanks to Guan Chenxian (@GCXWLP) for reporting this issue.
For more information
If there are any questions or comments about this advisory:
- Visit Wagtail's support channels
- Email Wagtail at [email protected] (view the security policy for more information).
- Record
GHSA-p5cm-246w-84jm- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVPYSEC-2026-2307
6.1
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.
- Record
PYSEC-2026-2307- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
OSVROOT-APP-PYPI-CVE-2026-28222 No score
CVE-2026-28222 in rootio-wagtail - Patched by Root
Root has patched CVE-2026-28222 in the rootio-wagtail package for Root:PyPI. Multiple fixed versions available.
- Record
ROOT-APP-PYPI-CVE-2026-28222- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
wagtailPyPI |
before 6.3.8 | 6.3.8 |
wagtailPyPI |
6.4rc1 up to 7.0.6 | 7.0.6 |
wagtailPyPI |
7.1rc1 up to 7.2.3 | 7.2.3 |
wagtailPyPI |
7.3rc1 up to 7.3.1 | 7.3.1 |
wagtailPyPI |
before 6.3.8, plus listed versions 0.10.20.30.3.10.4 Show 45 moreShow less0.4.10.50.60.70.80.8.10.8.100.8.20.8.30.8.40.8.50.8.60.8.70.8.80.8.91.01.0b11.0b21.0rc11.0rc21.11.101.10.11.10rc11.111.11.11.11rc11.121.12.11.12.21.12.31.12.41.12.51.12.61.12rc11.131.13.11.13.21.13.31.13.41.13rc11.1rc11.21.2rc11.3 |
6.3.8 |
wagtailPyPI |
6.4rc1 up to 7.0.6, plus listed versions 6.46.4.16.4.27.07.0.1 Show 5 moreShow less7.0.27.0.37.0.47.0.57.0rc1 |
7.0.6 |
wagtailPyPI |
7.1rc1 up to 7.2.3, plus listed versions 7.17.1.17.1.27.1.37.27.2.17.2.27.2rc1 |
7.2.3 |
wagtailPyPI |
7.3rc1 up to 7.3.1, plus listed versions 7.3 |
7.3.1 |
wagtailPyPI |
before 6.3.8, 6.4 up to 7.0.6, 7.1 up to 7.2.3, plus listed versions 0.10.20.30.3.10.4 Show 45 moreShow less0.4.10.50.60.70.80.8.10.8.100.8.20.8.30.8.40.8.50.8.60.8.70.8.80.8.91.01.0b11.0b21.0rc11.0rc21.11.101.10.11.10rc11.111.11.11.11rc11.121.12.11.12.21.12.31.12.41.12.51.12.61.12rc11.131.13.11.13.21.13.31.13.41.13rc11.1rc11.21.2rc11.3 |
6.3.87.0.67.2.3 |
rootio-wagtailRoot:PyPI |
before 4.2.3+root.io.1 | 4.2.3+root.io.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-28222 is a medium vulnerability (CVSS 6.1) in Torchbox Wagtail, published March 3, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.50%, the 43rd percentile. Fixed in wagtail 6.3.8.
References
github.com/wagtail/wagtail/security/advisories/GHSA-p5cm-246w-84jm
github.com/wagtail/wagtail/commit/0375094bb57ce6e527005c2bb2e871dd20bca04d
github.com/wagtail/wagtail/commit/4620423cb22c5253391a0f04178089c1162f6e2e
github.com/wagtail/wagtail/commit/575c0d7c18c7716ed73f7a3c2720ad75956f0a85
github.com/wagtail/wagtail/commit/605a5569686565e035313222e1bc2f9802fbc55b
github.com/wagtail/wagtail/releases/tag/v6.3.8
Show 7 moreShow less
github.com/wagtail/wagtail/releases/tag/v7.0.6
github.com/wagtail/wagtail/releases/tag/v7.2.3
github.com/wagtail/wagtail/releases/tag/v7.3.1
nvd.nist.gov/vuln/detail/CVE-2026-28222
github.com/advisories/GHSA-p5cm-246w-84jm
github.com/CVEProject/cvelistV5/tree/main/cves/2026/28xxx/CVE-2026-28222.json
github.com/wagtail/wagtail
Left out here: 436 versions. The JSON record has them.