CVE-2023-28836
Wagtail vulnerable to stored Cross-site Scripting attack via ModelAdmin views
Wagtail is an open source content management system built on Django. Starting in version 1.5 and prior to versions 4.1.4 and 4.2.2, a stored cross-site scripting (XSS) vulnerability exists on ModelAdmin views within the Wagtail admin interface. A user with a limited-permission editor account for the Wagtail admin could potentially craft pages and documents that, when viewed by a user with higher privileges, could perform 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 with ModelAdmin enabled. For page, the vulnerability is in the "Choose a parent page" ModelAdmin view (ChooseParentView), available when managing pages via ModelAdmin. For documents, the vulnerability is in the ModelAdmin Inspect view (InspectView) when displaying document fields. Patched versions have been released as Wagtail 4.1.4 and Wagtail 4.2.2. Site owners who are unable to upgrade to the new versions can disable or override the corresponding functionality.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- High
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
6.4
Wagtail vulnerable to stored Cross-site Scripting attack via ModelAdmin views
Wagtail is an open source content management system built on Django. Starting in version 1.5 and prior to versions 4.1.4 and 4.2.2, a stored cross-site scripting (XSS) vulnerability exists on ModelAdmin views within the Wagtail admin interface. A user with a limited-permission editor account for the Wagtail admin could potentially craft pages and documents that, when viewed by a user with higher privileges, could perform 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 with ModelAdmin enabled. For page, the vulnerability is in the "Choose a parent page" ModelAdmin view (ChooseParentView), available when managing pages via ModelAdmin. For documents, the vulnerability is in the ModelAdmin Inspect view (InspectView) when displaying document fields. Patched versions have been released as Wagtail 4.1.4 and Wagtail 4.2.2. Site owners who are unable to upgrade to the new versions can disable or override the corresponding functionality.
- Record
CVE-2023-28836- CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-79
- Updated
- 2026-11-02
EUVDEUVD-2023-0278
6.4
Wagtail is an open source content management system built on Django. Starting in version 1.5 and prior to versions 4.1.4 and 4.2.2, a stored cross-site scripting (XSS) vulnerability exists on ModelAdmin views within the Wagtail admin interface. A user with a limited-permission editor account for the Wagtail admin could potentially craft pages and documents that, when viewed by a user with higher privileges, could perform 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 with ModelAdmin enabled. For page, the vulnerability is in the "Choose a parent page" ModelAdmin view (ChooseParentView), available when managing pages via ModelAdmin. For documents, the vulnerability is in the ModelAdmin Inspect view (InspectView) when displaying document fields. Patched versions have been released as Wagtail 4.1.4 and Wagtail 4.2.2. Site owners who are unable to upgrade to the new versions can disable or override the corresponding functionality.
- Record
EUVD-2023-0278- CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-5286-f2rf-35c2
7.5
Wagtail vulnerable to stored Cross-site Scripting attack via ModelAdmin views
Impact
A stored cross-site scripting (XSS) vulnerability exists on ModelAdmin views within the Wagtail admin interface. A user with a limited-permission editor account for the Wagtail admin could potentially craft pages and documents that, when viewed by a user with higher privileges, could perform 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 with ModelAdmin enabled.
- For page, the vulnerability is in the "Choose a parent page" ModelAdmin view (
ChooseParentView), available when managing pages via ModelAdmin. - For documents, the vulnerability is in the ModelAdmin Inspect view (
InspectView) when displaying document fields.
Patches
Patched versions have been released as Wagtail 4.1.4 (for the LTS 4.1 branch) and Wagtail 4.2.2 (for the current 4.2 branch).
Workarounds
Site owners who are unable to upgrade to the new versions can disable or override the corresponding functionality.
ChooseParentView
For ChooseParentView:
- Disable ModelAdmin for all page models.
- Or provide a custom view via
choose_parent_view_class, with the custom view overriding theget_formmethod.
One of those steps need to be applied for every ModelAdmin class hooked into Wagtail where the model is a Wagtail Page or sub-class. Here is an example of implementing the custom ChooseParentView with patched HTML escaping:
from django import forms
from django.utils.translation import gettext as _
from wagtail.contrib.modeladmin.views import ChooseParentView
from wagtail.contrib.modeladmin.forms import ParentChooserForm
class PatchedPageChoiceField(forms.ModelChoiceField):
"""PageChoiceField with plain-text breadcrumbs to patch stored XSS."""
def label_from_instance(self, obj):
bits = []
for ancestor in (
obj.get_ancestors(inclusive=True).exclude(depth=1).specific(defer=True)
):
bits.append(ancestor.get_admin_display_title())
return ' | '.join(bits)
class PatchedParentChooserForm(ParentChooserForm):
"""ParentChooserForm with custom parent_page to patch stored XSS."""
parent_page = PatchedPageChoiceField(
label=_("Parent page"),
required=True,
empty_label=None,
queryset=Page.objects.none(),
widget=forms.RadioSelect(),
)
class PatchedChooseParentView(ChooseParentView):
"""ChooseParentView with custom get_form patch stored XSS."""
def get_form(self, request):
parents = self.permission_helper.get_valid_parent_pages(request.user)
return PatchedParentChooserForm(parents, request.POST or None)
InspectView
For InspectView:
- Remove
inspect_view_enabled=Trueor set it to False to disable the view. - Or use
inspect_view_fieldsorinspect_view_fields_excludeto prevent displaying document fields in the views. - Or provide a custom view via
inspect_view_class, with the custom view overriding theget_document_field_displaymethod.
One of those steps need to…
- Record
GHSA-5286-f2rf-35c2- CVSS 4.0
- 7.5 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-79
- Updated
- 2026-11-02
NVD
6.4
Wagtail is an open source content management system built on Django. Starting in version 1.5 and prior to versions 4.1.4 and 4.2.2, a stored cross-site scripting (XSS) vulnerability exists on ModelAdmin views within the Wagtail admin interface. A user with a limited-permission editor account for the Wagtail admin could potentially craft pages and documents that, when viewed by a user with higher privileges, could perform 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 with ModelAdmin enabled. For page, the vulnerability is in the "Choose a parent page" ModelAdmin view (ChooseParentView), available when managing pages via ModelAdmin. For documents, the vulnerability is in the ModelAdmin Inspect view (InspectView) when displaying document fields. Patched versions have been released as Wagtail 4.1.4 and Wagtail 4.2.2. Site owners who are unable to upgrade to the new versions can disable or override the corresponding functionality.
- Record
CVE-2023-28836- CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H - CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSV
6.4
Wagtail vulnerable to stored Cross-site Scripting attack via ModelAdmin views
Wagtail is an open source content management system built on Django. Starting in version 1.5 and prior to versions 4.1.4 and 4.2.2, a stored cross-site scripting (XSS) vulnerability exists on ModelAdmin views within the Wagtail admin interface. A user with a limited-permission editor account for the Wagtail admin could potentially craft pages and documents that, when viewed by a user with higher privileges, could perform 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 with ModelAdmin enabled. For page, the vulnerability is in the "Choose a parent page" ModelAdmin view (ChooseParentView), available when managing pages via ModelAdmin. For documents, the vulnerability is in the ModelAdmin Inspect view (InspectView) when displaying document fields. Patched versions have been released as Wagtail 4.1.4 and Wagtail 4.2.2. Site owners who are unable to upgrade to the new versions can disable or override the corresponding functionality.
- Record
CVE-2023-28836- CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVGHSA-5286-f2rf-35c2
7.5
Wagtail vulnerable to stored Cross-site Scripting attack via ModelAdmin views
Impact
A stored cross-site scripting (XSS) vulnerability exists on ModelAdmin views within the Wagtail admin interface. A user with a limited-permission editor account for the Wagtail admin could potentially craft pages and documents that, when viewed by a user with higher privileges, could perform 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 with ModelAdmin enabled.
- For page, the vulnerability is in the "Choose a parent page" ModelAdmin view (
ChooseParentView), available when managing pages via ModelAdmin. - For documents, the vulnerability is in the ModelAdmin Inspect view (
InspectView) when displaying document fields.
Patches
Patched versions have been released as Wagtail 4.1.4 (for the LTS 4.1 branch) and Wagtail 4.2.2 (for the current 4.2 branch).
Workarounds
Site owners who are unable to upgrade to the new versions can disable or override the corresponding functionality.
ChooseParentView
For ChooseParentView:
- Disable ModelAdmin for all page models.
- Or provide a custom view via
choose_parent_view_class, with the custom view overriding theget_formmethod.
One of those steps need to be applied for every ModelAdmin class hooked into Wagtail where the model is a Wagtail Page or sub-class. Here is an example of implementing the custom ChooseParentView with patched HTML escaping:
from django import forms
from django.utils.translation import gettext as _
from wagtail.contrib.modeladmin.views import ChooseParentView
from wagtail.contrib.modeladmin.forms import ParentChooserForm
class PatchedPageChoiceField(forms.ModelChoiceField):
"""PageChoiceField with plain-text breadcrumbs to patch stored XSS."""
def label_from_instance(self, obj):
bits = []
for ancestor in (
obj.get_ancestors(inclusive=True).exclude(depth=1).specific(defer=True)
):
bits.append(ancestor.get_admin_display_title())
return ' | '.join(bits)
class PatchedParentChooserForm(ParentChooserForm):
"""ParentChooserForm with custom parent_page to patch stored XSS."""
parent_page = PatchedPageChoiceField(
label=_("Parent page"),
required=True,
empty_label=None,
queryset=Page.objects.none(),
widget=forms.RadioSelect(),
)
class PatchedChooseParentView(ChooseParentView):
"""ChooseParentView with custom get_form patch stored XSS."""
def get_form(self, request):
parents = self.permission_helper.get_valid_parent_pages(request.user)
return PatchedParentChooserForm(parents, request.POST or None)
InspectView
For InspectView:
- Remove
inspect_view_enabled=Trueor set it to False to disable the view. - Or use
inspect_view_fieldsorinspect_view_fields_excludeto prevent displaying document fields in the views. - Or provide a custom view via
inspect_view_class, with the custom view overriding theget_document_field_displaymethod.
One of those steps need to…
- Record
GHSA-5286-f2rf-35c2- CVSS 4.0
- 7.5 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVPYSEC-2023-55 No score
Wagtail is an open source content management system built on Django. Starting in version 1.5 and prior to versions 4.1.4 and 4.2.2, a stored cross-site scripting (XSS) vulnerability exists on ModelAdmin views within the Wagtail admin interface. A user with a limited-permission editor account for the Wagtail admin could potentially craft pages and documents that, when viewed by a user with higher privileges, could perform 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 with ModelAdmin enabled. For page, the vulnerability is in the "Choose a parent page" ModelAdmin view (ChooseParentView), available when managing pages via ModelAdmin. For documents, the vulnerability is in the ModelAdmin Inspect view (InspectView) when displaying document fields. Patched versions have been released as Wagtail 4.1.4 and Wagtail 4.2.2. Site owners who are unable to upgrade to the new versions can disable or override the corresponding functionality.
- Record
PYSEC-2023-55- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
wagtailPyPI |
1.5 up to 4.1.4 | 4.1.4 |
wagtailPyPI |
4.2 up to 4.2.2 | 4.2.2 |
wagtailPyPI |
1.5 up to 4.1.4, plus listed versions 1.101.10.11.10rc11.111.11.1 Show 45 moreShow less1.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.5.11.5.21.5.31.61.6.11.6.21.6.31.6rc11.71.7rc11.81.8.11.8.21.8rc11.91.9.11.9rc12.02.0.12.0.22.0b12.0rc12.12.1.12.1.22.1.32.102.10.12.10.22.10rc1 |
4.1.4 |
wagtailPyPI |
4.2 up to 4.2.2, plus listed versions 4.2.1 |
4.2.2 |
wagtailPyPI |
1.5 up to 4.1.4, 4.2 up to 4.2.2, plus listed versions 1.101.10.11.10rc11.111.11.1 Show 45 moreShow less1.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.5.11.5.21.5.31.61.6.11.6.21.6.31.6rc11.71.7rc11.81.8.11.8.21.8rc11.91.9.11.9rc12.02.0.12.0.22.0b12.0rc12.12.1.12.1.22.1.32.102.10.12.10.22.10rc1 |
4.1.44.2.2 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2023-28836 is a medium vulnerability (CVSS 6.4) in Torchbox Wagtail, published April 3, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.77%, the 55th percentile. Fixed in wagtail 4.1.4.
References
github.com/wagtail/wagtail/commit/bc84bf9815610cfbf8db3b6050c7ddcbaa4b9713
github.com/wagtail/wagtail/commit/eefc3381d37b476791610e5d30594fae443f33af
docs.wagtail.org/en/stable/reference/contrib/modeladmin/chooseparentview.html
docs.wagtail.org/en/stable/reference/contrib/modeladmin/inspectview.html
github.com/wagtail/wagtail/releases/tag/v4.2.2
github.com/wagtail/wagtail/security/advisories/GHSA-5286-f2rf-35c2
Show 8 moreShow less
github.com/wagtail/wagtail/commit/5be2b1ed55fd7259dfdf2c82e7701dba407b8b62
github.com/wagtail/wagtail/commit/ff806ab173a504395fdfb3139eb0a29444ab4b91
github.com/wagtail/wagtail/releases/tag/v4.1.4
nvd.nist.gov/vuln/detail/CVE-2023-28836
github.com/pypa/advisory-database/tree/main/vulns/wagtail/PYSEC-2023-55.yaml
github.com/advisories/GHSA-5286-f2rf-35c2
github.com/CVEProject/cvelistV5/tree/main/cves/2023/28xxx/CVE-2023-28836.json
github.com/wagtail/wagtail
Left out here: 235 versions and the rest of 2 source descriptions. The JSON record has them.