-
Notifications
You must be signed in to change notification settings - Fork 17
chore(deps): update dependency wagtail to v5 [security] #5362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
renovate
wants to merge
1
commit into
master
Choose a base branch
from
renovate/pypi-wagtail-vulnerability
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8d7f6c2
to
ac2474d
Compare
ee61429
to
5606af6
Compare
bb54d7b
to
d3e2524
Compare
d3e2524
to
207315b
Compare
207315b
to
94c5f32
Compare
5396e90
to
c6e82de
Compare
061b3f7
to
bcbe986
Compare
bcbe986
to
d6dd021
Compare
7d1efb9
to
bdbb11b
Compare
bdbb11b
to
e2ac110
Compare
0d42b83
to
3b479a1
Compare
3b479a1
to
88a1e1b
Compare
88a1e1b
to
330450a
Compare
90f43e5
to
b8046ca
Compare
b8046ca
to
7fe18c4
Compare
7fe18c4
to
55dd0bf
Compare
7320fbd
to
54750f0
Compare
10ad938
to
ad90f16
Compare
951b897
to
0a10897
Compare
0a10897
to
6bc80df
Compare
6bc80df
to
8bbc079
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
None yet
0 participants
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==2.12.5
->==5.2.6
GitHub Vulnerability Alerts
CVE-2023-28836
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.
ChooseParentView
), available when managing pages via ModelAdmin.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
:choose_parent_view_class
, with the custom view overriding theget_form
method.One of those steps need to be applied for every
ModelAdmin
class hooked into Wagtail where the model is a WagtailPage
or sub-class. Here is an example of implementing the customChooseParentView
with patched HTML escaping:InspectView
For
InspectView
:inspect_view_enabled=True
or set it to False to disable the view.inspect_view_fields
orinspect_view_fields_exclude
to prevent displaying document fields in the views.inspect_view_class
, with the custom view overriding theget_document_field_display
method.One of those steps need to be applied for every
ModelAdmin
class hooked into Wagtail whereinspect_view_enabled=True
. Here is an example of implementing the customInspectView
with patched HTML escaping:CVE-2023-28837
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:
client_max_body_size
LimitRequestBody
SizeConstraint
traefik.http.middlewares.limit.buffering.maxRequestBodyBytes
The changes themselves are deep inside Wagtail, making patching incredibly difficult.
CVE-2023-45809
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:
CVE-2024-39317
Impact
A bug in Wagtail's
parse_query_string
would result in it taking a long time to process suitably crafted inputs. When used to parse sufficiently long strings of characters without a space,parse_query_string
would take an unexpectedly large amount of time to process, resulting in a denial of service.In an initial Wagtail installation, the vulnerability can be exploited by any Wagtail admin user. It cannot be exploited by end users. If your Wagtail site has a custom search implementation which uses
parse_query_string
, it may be exploitable by other users (e.g. unauthenticated users).Patches
Patched versions have been released as Wagtail 5.2.6, 6.0.6 and 6.1.3.
This vulnerability affects all unpatched versions from Wagtail 2.0 onwards.
Workarounds
Site owners who are unable to upgrade to a patched version can limit the length of search terms passed to
parse_query_string
. Whilst the performance characteristics will depend on your hosting environment, 1000 characters has been shown to still be fairly fast, without triggering this vulnerability.No workaround is available for the Wagtail admin usage.
Acknowledgements
Many thanks to Jake Howard for reporting this issue.
For more information
If you have any questions or comments about this advisory:
Release Notes
wagtail/wagtail (wagtail)
v5.2.6
: 5.2.6Compare Source
v5.2.5
: 5.2.5Compare Source
WAGTAIL_ALLOW_UNICODE_SLUGS
setting when auto-generating slugs (LB (Ben) Johnston)convert_mariadb_uuids
management command to assist with upgrading to Django 5.0+ on MariaDB (Matt Westcott)v5.2.4
: 5.2.4Compare Source
v5.2.3
: 5.2.3Compare Source
FormSubmissionsPanel
on Django 5.0 when creating a new form page (Matt Westcott)v5.2.2
: 5.2.2Compare Source
index_results.html
orindex_results_template_name
override on initial load (Stefan Hammer)last_published_by_user
(Chiemezuo Akujobi)v5.2.1
: 5.2.1Compare Source
decorate_paginated_queryset
before pagination / filtering (Alex Tomkins){% picture ... as ... %}
template tag (Rezyapkin)v5.2
: 5.2 (LTS)Compare Source
wagtailcache
&wagtailpagecache
(Jake Howard)field.html
template (Sage Abdullah)SnippetViewSet
menu registration mechanism to baseViewSet
class (Sage Abdullah)ModelViewSet
(Sage Abdullah)SnippetViewSet
template override mechanism toModelViewSet
(Sage Abdullah)SnippetViewSet.list_display
toModelViewSet
(Sage Abdullah)wagtail.publish
log action on aliases when they are created from live source pages or the source page is published (Dan Braghis)wagtail.unpublish
log action on aliases when source page is unpublished (Dan Braghis)IndexView
(Sage Abdullah)list_filter
,filterset_class
,search_fields
,search_backend_name
,list_export
,export_filename
,list_per_page
, andordering
fromSnippetViewSet
toModelViewSet
(Sage Abdullah, Cynthia Kiser)IndexView
andCreateView
(Sage Abdullah)IndexView.export_headings
viaModelViewSet
(Christer Jensen, Sage Abdullah)get_object_list
method onChooserViewSet
(Matt Westcott)linked_fields
mechanism on chooser widgets to allow choices to be limited by fields on the calling page (Matt Westcott)TableBlock
with themergedCells
option (Gareth Palmer)InlinePanel
, focus will now shift to that content similar toStreamField
(Faishal Manzar)placement
in thehuman_readable_date
tooltip template tag (Rohit Sharma)ModelViewSet
views (Sage Abdullah){% component %}
tag (Matt Westcott)PagesAPIViewSet
override default Page model via themodel
attribute (Neeraj Yetheendran, Herbert Poul)ModelViewSet
to be used with models that have non-integer primary keys (Sage Abdullah)HistoryView
from snippets and add it toModelViewSet
(Sage Abdullah)UsageView
toModelViewSet
(Sage Abdullah)IndexView
(Sage Abdullah)wagtail_update_image_renditions
management command (Faishal Manzar)hashlib.file_digest
if available (Python 3.11+) (Jake Howard)Block.get_template
to allow varying template based on value (Florian Delizy)InlinePanel
DOM events for when ready and when items added or removed (Faishal Manzar)picture
template tag for Django Templates and Jinja (Thibaud Colas)srcset_image
template tag for Django Templates and Jinja (Thibaud Colas)Filter
instances as input forAbstractImage.get_renditions()
(Thibaud Colas)FieldPanel('title')
examples to use the recommendedTitleFieldPanel('title')
panel (Chinedu Ihedioha)purge_revisions
management command now respects revisions that have aon_delete=PROTECT
foreign key relation and won't delete them (Neeraj P Yetheendran, Meghana Reddy, Sage Abdullah, Storm Heg)FieldBlock
s correctly set therequired
andaria-describedby
attributes (Storm Heg)PublishMenuItem
to more easily support overriding its label viaconstruct_page_action_menu
(Sébastien Corbin)non_fields_errors
for any custom form validation (Sébastien Corbin)WAGTAIL_EMAIL_MANAGEMENT_ENABLED
setting by not showing 'email' if disabled (Omkar Jadhav)ViewSet
andModelViewSet
(Sage Abdullah)WAGTAILADMIN_BASE_URL
on "Integrating Wagtail into a Django project" page (Shreshth Srivastava)WAGTAILADMIN_RICH_TEXT_EDITORS
setting (Charlie Sue)python3-venv
on Ubuntu (Brian Mugo)WagtailTestUtils.get_soup()
method for testing HTML content (Storm Heg, Sage Abdullah)ViewSet
subclasses to customiseurl_prefix
andurl_namespace
logic (Matt Westcott)SnippetViewSet
registration code (Sage Abdullah)IndexView.results_template_name
toresults.html
(Sage Abdullah)w-bulk
Stimulus implementation (LB (Ben) Johnston)w-message
controller (LB (Ben) Johnston, Hussain Saherwala)stubs.js
to prevent Storybook from crashing (LB (Ben) Johnston)slim_header.html
template (Sage Abdullah)slim_header.html
template to reduce code duplication (Sage Abdullah)imghdr
(Jake Howard)imghdr
with Willow's built-in MIME type detection (Jake Howard)data-tippy
HTML attribute usage to the Stimulus data-*-value attributes for w-tooltip & w-dropdown (Subhajit Ghosh, LB (Ben) Johnston)@total_ordering
usage with comparison functions implementation (Virag Jain)<script type="text/django-form-template"><-/script>
template approach with HTMLtemplate
elements in InlinePanel and expanding formset (Mansi Gundre, Subhajit Ghosh, LB (Ben) Johnston)ModelViewSet
andSnippetViewSet
(Sage Abdullah)lru_cache
usage (Jake Howard)date_since
inget_most_popular
insidesearch_promotions.models.Query
(TopDevPros)classname
(notclassnames
) attributes for allMenuItem
usage, including deprecation warnings (LB (Ben) Johnston)classname
(notclassnames
) attribute within thewagtail.images.formats.Format
instance, including deprecation warnings (LB (Ben) Johnston)context
argument ofconstruct_snippet_listing_buttons
hook (Sage Abdullah)search.Query
&search.QueryDailyHits
model, move final set of templates from the admin search module to the search promotions contrib module (LB (Ben) Johnston)InspectView
toModelViewSet
(Sage Abdullah)reset
method to support Stimulus driven dynamic field resets via thew-action
controller (Chiemezuo Akujobi)notify
target on the Stimulus dialog for dispatching events internally (Chiemezuo Akujobi)v5.1.3
: 5.1.3Compare Source
SnippetBulkAction
not respectingmodels
definition (Sandro Rodrigues)v5.1.2
: 5.1.2Compare Source
ignore_conflicts
when creating extra permissions for snippets, for SQL Server compatibility (Sage Abdullah)wagtailsearchpromotions_query
table is correctly set after migrating data (Jake Howard)None
from being exported as strings (Christer Jensen)imghdr
with Willow's built-in MIME type detection (Jake Howard)v5.1.1
: 5.1.1Compare Source
wagtail.admin.ui.tables.BooleanColumn
to display boolean values as icons (Sage Abdullah)None
falsy values instead of blank in generic table cell template (Sage Abdullah)read_only
panels for fields with translatable choice labels (Florent Lebreton)v5.1
: 5.1Compare Source
md5
as not being used for secure purposes, to avoid flagging on FIPS-mode systems (Sean Kelly)parse_query_string
as aQueryDict
to support multiple values (Aman Pandey)MenuItem.name
for all admin menu and submenu items (Justin Koestinger)PagePermissionPolicy
(Sage Abdullah)UserPagePermissionsProxy
andPagePermissionTester
to usePagePermissionPolicy
(Sage Abdullah, Tidiane Dia)AbstractImage.get_renditions()
for efficient generation of multiple renditions (Andy Babic)StreamField
block when only one block type is declared (Sébastien Corbin)SnippetViewSet.list_export
(Sage Abdullah)attrs
onFieldPanel
,FieldRowPanel
,MultiFieldPanel
, and others (Aman Pandey, Antoni Martyniuk, LB (Ben) Johnston)--template
option towagtail start
(Thibaud Colas)purge_revisions
command (Sage Abdullah)parent_page_types
would disallow it (Dan Braghis)UsageView
fromEditView
for snippets (Christer Jensen)RichText
objects with the same values compare as equal (NikilTn)gettext_lazy
on generic model views so that language settings are correctly used (Matt Westcott)MultipleChooserPanel
(Matt Westcott)innerHTML
when modifying DOM content (LB (Ben) Johnston)ValueError
when extendingPagesAPIViewSet
and settingmeta_fields
to an empty list (Henry Harutyunyan, Alex Morega)PagePermissionHelper.user_can_unpublish_obj()
in ModelAdmin (Sébastien Corbin)search_promotions
0004_copy_queries
migration for long-lived Wagtail instances (Sage Abdullah)TypeError
in0088_fix_log_entry_json_timestamps
migration (Sage Abdullah)page_header_buttons
template tag when accessing the context's request object (Robert Rollins)ModelAdminGroup
(Onno Timmerman)log_action
parameter onRevisionMixin.save_revision
(Christer Jensen)searchpromotions
(Scott Foster)insert_editor_css
in favour ofinsert_global_admin_css
(Ester Beltrami)specific
on Task and TaskState (Matt Westcott)parent_context
is mutable (Andreas Nüßlein)UserPagePermissionsProxy
(Sage Abdullah)django-filter
version upper bound to v24 (Yuekui)w-swap
, a Stimulus controller (LB (Ben) Johnston)w-tooltip
Stimulus controller (LB (Ben) Johnston)jest-environment-jsdom
and new snapshot format (LB (Ben) Johnston)w-dialog
Stimulus controller (Loveth Omokaro, LB (Ben) Johnston)w-teleport
Stimulus controller (Loveth Omokaro, LB (Ben) Johnston)"wagtailadmin/shared/field_as_li.html"
template include (Storm Heg)wagtail.contrib.modeladmin
(Sage Abdullah)sphinx_wagtail_theme
to v6.1.1 which includes multiple styling fixes and always visible code copy buttons (LB (Ben) Johnston)v5.0.5
: 5.0.5Compare Source
v5.0.4
: 5.0.4Compare Source
v5.0.3
: 5.0.3Compare Source
ignore_conflicts
when creating extra permissions for snippets, for SQL Server compatibility (Sage Abdullah)wagtailsearchpromotions_query
table is correctly set after migrating data (Jake Howard)v5.0.2
: 5.0.2Compare Source
TitleFieldPanel
to support title / slug field synchronisation (LB (Ben) Johnston)MultipleChooserPanel
(Matt Westcott)v5.0.1
: 5.0.1Compare Source
WAGTAILADMIN_COMMENTS_ENABLED
(Thibaud Colas)for_update
value forget_form_class
inSnippetViewSet
edit views (Sage Abdullah)UsageView
fromEditView
for snippets (Christer Jensen)log_action
parameter onRevisionMixin.save_revision
(Christer Jensen)v5.0
: 5.0Compare Source
WAGTAILIMAGES_EXTENSIONS
setting to restrict image uploads to specific file types (Aman Pandey, Ananjan-R)Access level
to be easier to understand (Vallabh Tiwari).button-longrunning
behaviour to a Stimulus controller with support for custom label element & duration (Loveth Omokaro)change
event (George Sakkis)search_fields = []
(Daniel Kirkham)wagtail.search.utils.parse_query_string
to allow inner single quotes for key/value parsing (Aman Pandey)Locale
for more convenient usage within templates (Andy Babic)SnippetViewSet.icon
(Daniel Kirkham, Sage Abdullah)MenuItem.name
for Snippets, Reports, and Settings menu items (Sage Abdullah)list_filter
attribute (Sage Abdullah)IndexView
(Sage Abdullah)search_fields
and search backend via SnippetViewSet (Sage Abdullah)panels
/edit_handler
to be specified viaSnippetViewSet
(Sage Abdullah)label_format
on StructBlock gracefully handles missing variables (Aadi jindal)Site.get_site_root_paths
works on cache backends that do not preserve Python objects (Jaap Roes)StructValue
copies (Tidiane Dia)GroupApprovalTask
if it's locked by someone outside of the group (Sage Abdullah)WorkflowLock
is currently applied (Sage Abdullah)wagtail.schedule.cancel
(Stefan Hammer)require_admin_access()
(Stefan Hammer)radio
input fields (Mehul Aggarwal)TemplateResponse
s for users with a custom timezone (Stefan Hammer, Sage Abdullah)download_url
whenWAGTAILDOCS_SERVE_METHOD
isdirect
(Swojak-A)ClusterableModel
requirements for using relations withRevisionMixin
-enabled models (Sage Abdullah)strictPropertyInitialization
in tsconfig (Thibaud Colas)Page.get_static_site_paths
method (Yosr Karoui)CollapseAll
andMinimapItem
components (Albina Starykova)AutoFieldController
to the less confusingSubmitController
(Loveth Omokaro)script
tags withtemplate
tag for image/document bulk uploads (Rishabh Kumar Bahukhandi)SlugInput
widget (Loveth Omokaro)status
HTML usage to shared template tag (Aman Pandey, LB (Ben) Johnston, Himanshu Garg)ModelAdmin
and Snippets type index header (Aman Pandey)wagtailsearch.Query
to `wagtail.contrib.search_promotionConfiguration
📅 Schedule: Branch creation - "" in timezone US/Eastern, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.