Where
-Infinity
0
Severity
6.1
EPSS
0.03%
XSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Wagtail CMS 6.4.1 is vulnerable to a Stored Cross-Site Scripting (XSS) in the document upload functionality. Attackers can inject malicious code inside a PDF file. When a user clicks the document in the CMS interface, the payload executes. NOTE: this is disputed by the Supplier because "It has been well documented that when serving uploaded files using a method outside of Wagtail (which admittedly is the default), it requires additional configuration from the developer, because Wagtail cannot control how these are served. ... For example, if a Wagtail instance is configured to upload files into AWS S3, Wagtail cannot control the permissions on how they're served, nor any headers used when serving them (a limitation of S3)."

First published (updated )
Severity
4.3
Infoleak
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

Impact When notifications for new replies in comment threads are sent, they are sent to all users who have replied or commented anywhere on the site, rather than only in the relevant threads. This means that a user could listen in to new comment replies on pages they have not had editing access to, as long as they have left a comment or reply somewhere on the site.

Patches A patched version has been released as Wagtail 2.15.2 (for the current LTS), which restores the intended behaviour - to send notifications for new replies to the participants in the active thread only (editing permissions are not considered).

Workarounds New comments can be disabled by setting WAGTAILADMINCOMMENTSENABLED = False in the Django settings file.

Acknowledgements

Many thanks to Ihor Marhitych for identifying this issue.

For more information If you have any questions or comments about this advisory:

Visit Wagtail's support channels Email us at security@wagtail.io (if you wish to send encrypted email, the public key ID is 0x6ba1e1a86e0f8ce8)

1 / 2
Source: GitHub
First published (updated )
Severity
6.4
XSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

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 chooseparentviewclass, with the custom view overriding the getform method.

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:

python 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 labelfrominstance(self, obj): bits = [] for ancestor in ( obj.getancestors(inclusive=True).exclude(depth=1).specific(defer=True) ): bits.append(ancestor.getadmindisplaytitle()) return ' | '.join(bits)

class PatchedParentChooserForm(ParentChooserForm): """ParentChooserForm with custom parentpage to patch stored XSS.""" parentpage = PatchedPageChoiceField( label=("Parent page"), required=True, emptylabel=None, queryset=Page.objects.none(), widget=forms.RadioSelect(), )

class PatchedChooseParentView(ChooseParentView): """ChooseParentView with custom getform patch stored XSS.""" def getform(self, request): parents = self.permissionhelper.getvalidparentpages(request.user) return PatchedParentChooserForm(parents, request.POST or None)

InspectView

For InspectView:

- Remove inspectviewenabled=True or set it to False to disable the view. - Or use inspectviewfields or inspectviewfieldsexclude to prevent displaying document fields in the views. - Or provide a custom view via inspectviewclass, with the custom view overriding the getdocumentfielddisplay method.

One of those steps need to be applied for every ModelAdmin class hooked into Wagtail where inspectviewenabled=True. Here is an example of implementing the custom InspectView with patched HTML escaping:

python from django.template.defaultfilters import filesizeformat from django.utils.html import formathtml from wagtail.contrib.modeladmin.views import InspectView

class PatchedInspectView(InspectView): """InspectView with override to patch stored XSS vulnerability.""" def getdocumentfielddisplay(self, fieldname, field): """Render a link to a document""" document = getattr(self.instance, fieldname) if document: return formathtml( '<a href="{}">{} <span class="meta">({}, {})</span></a>', document.url, document.title, document.fileextension.upper(), filesizeformat(document.file.size), ) return self.modeladmin.getemptyvaluedisplay(fieldname)

1 / 2
Source: GitHub
First published (updated )
Severity
4.9
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H

Impact

A memory exhaustion bug exists in Wagtail's handling of uploaded images and documents. For both images and documents, files are loaded into memory during upload for additional processing. A user with access to upload images or documents through the Wagtail admin interface could upload a file so large that it results in a crash or denial of service.

The vulnerability is not exploitable by an ordinary site visitor without access to the Wagtail admin. It can only be exploited by admin users with permission to upload images or documents.

Image uploads are restricted to 10MB by default, however this validation only happens on the frontend and on the backend after the vulnerable code.

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 are encouraged to add extra protections outside of Wagtail to limit the size of uploaded files. Exactly how this is done will vary based on your hosting environment, but here are a few references for common setups:

- Nginx: clientmaxbodysize - Apache: LimitRequestBody - Cloudflare: Already imposes a limit of 100MB - 500MB depending on plan - CloudFront: SizeConstraint - Traefik: traefik.http.middlewares.limit.buffering.maxRequestBodyBytes

The changes themselves are deep inside Wagtail, making patching incredibly difficult.

1 / 3
Source: GitHub
First published (updated )
Severity
2.7
Infoleak
AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N

Impact

A user with a limited-permission editor account for the Wagtail admin can make a direct URL request to the admin view that handles bulk actions on user accounts. While authentication rules prevent the user from making any changes, the error message discloses the display names of user accounts, and by modifying URL parameters, the user can retrieve the display name for any user. The vulnerability is not exploitable by an ordinary site visitor without access to the Wagtail admin.

Patches Patched versions have been released as Wagtail 4.1.9 (LTS), 5.0.5 and 5.1.3. The fix is also included in Release Candidate 1 of the forthcoming Wagtail 5.2 release.

Workarounds None.

Acknowledgements Many thanks to @quyenheu for reporting this issue.

For more information If you have any questions or comments about this advisory:

Visit Wagtail's support channels Email us at security@wagtail.org (view our security policy for more information).

1 / 2
First published (updated )
Severity
6.1
XSS
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N

Impact When saving the contents of a rich text field in the admin interface, Wagtail does not apply server-side checks to ensure that link URLs use a valid protocol. A malicious user with access to the admin interface could thus craft a POST request to publish content with javascript: URLs containing arbitrary code. The vulnerability is not exploitable by an ordinary site visitor without access to the Wagtail admin.

Patches Patched versions have been released as Wagtail 2.11.7 (for the LTS 2.11 branch) and Wagtail 2.12.4 (for the current 2.12 branch).

Workarounds For sites that cannot easily upgrade to a current supported version, the vulnerability can be patched by adding the following code to a wagtailhooks.py module in any installed app:

python from draftjsexporter.dom import DOM from wagtail.admin.richtext.converters.htmltocontentstate import ExternalLinkElementHandler, PageLinkElementHandler from wagtail.core import hooks from wagtail.core.whitelist import checkurl

def linkentity(props): id = props.get('id') linkprops = {}

if id is not None: linkprops['linktype'] = 'page' linkprops['id'] = id else: linkprops['href'] = checkurl(props.get('url'))

return DOM.createelement('a', linkprops, props['children'])

@hooks.register('registerrichtextfeatures', order=1) def registerlink(features): features.registerconverterrule('contentstate', 'link', { 'fromdatabaseformat': { 'a[href]': ExternalLinkElementHandler('LINK'), 'a[linktype="page"]': PageLinkElementHandler('LINK'), }, 'todatabaseformat': { 'entitydecorators': {'LINK': linkentity} } })

Acknowledgements Many thanks to Kevin Breen for reporting this issue.

For more information If you have any questions or comments about this advisory:

Visit Wagtail's support channels Email us at security@wagtail.io (if you wish to send encrypted email, the public key ID is 0x6ba1e1a86e0f8ce8)

1 / 2
Source: GitHub
First published (updated )
Severity
5.7
XSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Impact When a form page type is made available to Wagtail editors through the wagtail.contrib.forms app, and the page template is built using Django's standard form rendering helpers such as form.asp (as directed in the documentation), any HTML tags used within a form field's help text will be rendered unescaped in the page. Allowing HTML within help text is an intentional design decision by Django; however, as a matter of policy Wagtail does not allow editors to insert arbitrary HTML by default, as this could potentially be used to carry out cross-site scripting attacks, including privilege escalation. This functionality should therefore not have been made available to editor-level users.

The vulnerability is not exploitable by an ordinary site visitor without access to the Wagtail admin.

Patches Patched versions have been released as Wagtail 2.7.4 (for the LTS 2.7 branch) and Wagtail 2.9.3 (for the current 2.9 branch). In these versions, help text will be escaped to prevent the inclusion of HTML tags. Site owners who wish to re-enable the use of HTML within help text (and are willing to accept the risk of this being exploited by editors) may set WAGTAILFORMSHELPTEXTALLOWHTML = True in their configuration settings.

Workarounds Site owners who are unable to upgrade to the new versions can secure their form page templates by rendering forms field-by-field as per Django's documentation, but omitting the |safe filter when outputting the help text.

Acknowledgements Many thanks to Timothy Bautista for reporting this issue.

For more information If you have any questions or comments about this advisory: Visit Wagtail's support channels Email us at security@wagtail.io (if you wish to send encrypted email, the public key ID is 0x6ba1e1a86e0f8ce8)

1 / 2
Source: GitHub
First published (updated )
Severity
6.1
Race Condition
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N

Impact A potential timing attack exists on pages or documents that have been protected with a shared password through Wagtail's "Privacy" controls. This password check is performed through a character-by-character string comparison, and so an attacker who is able to measure the time taken by this check to a high degree of accuracy could potentially use timing differences to gain knowledge of the password. (This is understood to be feasible on a local network, but not on the public internet.)

Privacy settings that restrict access to pages / documents on a per-user or per-group basis (as opposed to a shared password) are unaffected by this vulnerability.

Patches Patched versions have been released as Wagtail 2.7.3 (for the LTS 2.7 branch), Wagtail 2.8.2 and Wagtail 2.9.

Workarounds Site owners who are unable to upgrade to the new versions can use user- or group-based privacy restrictions to restrict access to sensitive information; these are unaffected by this vulnerability.

1 / 3
Source: GitHub
First published (updated )
Severity
6.8
XSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N

Impact A cross-site scripting (XSS) vulnerability exists on the page revision comparison view within the Wagtail admin interface. A user with a limited-permission editor account for the Wagtail admin could potentially craft a page revision history 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.

Patches Patched versions have been released as Wagtail 2.7.2 (for the LTS 2.7 branch) and Wagtail 2.8.1 (for the current 2.8 branch).

Workarounds Site owners who are unable to upgrade to the new versions can disable the revision comparison view by adding the following URL route to the top of their project's urls.py configuration:

from django.views.generic.base import RedirectView

urlpatterns = [ url(r'^admin/pages/(\d+)/revisions/compare/', RedirectView.asview(url='/admin/')), # ... ]

Acknowledgements Many thanks to Vlad Gerasimenko for reporting this issue.

For more information If you have any questions or comments about this advisory: Visit Wagtail's support channels Email us at security@wagtail.io (if you wish to send encrypted email, the public key ID is 0x6ba1e1a86e0f8ce8)

1 / 3
Source: GitHub
First published (updated )
Severity
5.4
XSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Impact When the {% includeblock %} 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 {% includeblock %} tag in {% autoescape off %}...{% endautoescape %}.

Workarounds Site implementors who are unable to upgrade to a current supported version should audit their use of {% includeblock %} to ensure it is not used to output CharBlock / TextBlock values with no associated template. Note that this only applies where {% includeblock %} is used directly on that block (uses of includeblock 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. {% includeblock mytitleblock %} becomes {{ mytitleblock }}.

Acknowledgements Many thanks to Karen Tracey for reporting this issue.

For more information If you have any questions or comments about this advisory:

Visit Wagtail's support channels Email us at security@wagtail.io (if you wish to send encrypted email, the public key ID is 0x6ba1e1a86e0f8ce8)

1 / 2
Source: GitHub
First published (updated )
EOL
May 6, 2025
Support Ends
May 6, 2025

End of life: 5/6/2025, End of support: 5/6/2025, Latest version: 5.2.8

First published (updated )
EOL
May 6, 2025
Support Ends
May 6, 2025

End of life: 5/6/2025, End of support: 5/6/2025, Latest version: 5.2.8

First published (updated )
EOL
Nov 1, 2024
Support Ends
Aug 1, 2024

End of life: 11/1/2024, End of support: 8/1/2024, Latest version: 6.1.3

First published (updated )
EOL
Nov 1, 2024
Support Ends
Aug 1, 2024

End of life: 11/1/2024, End of support: 8/1/2024, Latest version: 6.1.3

First published (updated )
EOL
Aug 1, 2024
Support Ends
May 1, 2024

End of life: 8/1/2024, End of support: 5/1/2024, Latest version: 6.0.6

First published (updated )
EOL
Aug 1, 2024
Support Ends
May 1, 2024

End of life: 8/1/2024, End of support: 5/1/2024, Latest version: 6.0.6

First published (updated )
EOL
Feb 1, 2024
Support Ends
Nov 1, 2023

End of life: 2/1/2024, End of support: 11/1/2023, Latest version: 5.1.3

First published (updated )
EOL
Feb 1, 2024
Support Ends
Nov 1, 2023

End of life: 2/1/2024, End of support: 11/1/2023, Latest version: 5.1.3

First published (updated )
EOL
Nov 1, 2023
Support Ends
Aug 1, 2023

End of life: 11/1/2023, End of support: 8/1/2023, Latest version: 5.0.5

First published (updated )
EOL
Nov 1, 2023
Support Ends
Aug 1, 2023

End of life: 11/1/2023, End of support: 8/1/2023, Latest version: 5.0.5

First published (updated )
EOL
Aug 1, 2023
Support Ends
May 2, 2023

End of life: 8/1/2023, End of support: 5/2/2023, Latest version: 4.2.4

First published (updated )
EOL
Aug 1, 2023
Support Ends
May 2, 2023

End of life: 8/1/2023, End of support: 5/2/2023, Latest version: 4.2.4

First published (updated )
EOL
Feb 1, 2024
Support Ends
Feb 1, 2024

End of life: 2/1/2024, End of support: 2/1/2024, Latest version: 4.1.9

First published (updated )
EOL
Feb 1, 2024
Support Ends
Feb 1, 2024

End of life: 2/1/2024, End of support: 2/1/2024, Latest version: 4.1.9

First published (updated )
EOL
Feb 1, 2023
Support Ends
Nov 1, 2022

End of life: 2/1/2023, End of support: 11/1/2022, Latest version: 4.0.4

First published (updated )
EOL
Feb 1, 2023
Support Ends
Nov 1, 2022

End of life: 2/1/2023, End of support: 11/1/2022, Latest version: 4.0.4

First published (updated )
EOL
Nov 1, 2022
Support Ends
Aug 31, 2022

End of life: 11/1/2022, End of support: 8/31/2022, Latest version: 3.0.3

First published (updated )
EOL
Nov 1, 2022
Support Ends
Aug 31, 2022

End of life: 11/1/2022, End of support: 8/31/2022, Latest version: 3.0.3

First published (updated )
EOL
Aug 1, 2022
Support Ends
May 1, 2022

End of life: 8/1/2022, End of support: 5/1/2022, Latest version: 2.16.3

First published (updated )
EOL
Aug 1, 2022
Support Ends
May 1, 2022

End of life: 8/1/2022, End of support: 5/1/2022, Latest version: 2.16.3

First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203