GHSA-f2p5-j6fg-5cxf: Medium severity pip/wagtail vulnerability

Published Aug 20, 2026
·
Updated

Impact

An authenticated admin user can trigger expensive rendition processing with purposefully crafted filter specs resulting in potentially service degradation.

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

Patches Patched versions have been released as Wagtail 7.0.8, 7.3.3, 7.4.2.

Workarounds For sites that cannot easily upgrade to a current supported version, the vulnerability can be patched by adding the following code to urls.py URL pattern declarations to override the vulnerable view.

python from django.core.exceptions import PermissionDenied from django.http import HttpResponseBadRequest from django.shortcuts import getobjector404 from django.urls import path from wagtail.admin import urls as wagtailadminurls from wagtail.images.exceptions import InvalidFilterSpecError from wagtail.images.permissions import permissionpolicy from wagtail.images.views import preview

def patchedpreview(request, imageid, filterspec): image = getobjector404(getimagemodel(), id=imageid)

if not permissionpolicy.userhaspermissionforinstance(request.user, "change", image): raise PermissionDenied

try: filterobj = Filter(spec=filterspec) except InvalidFilterSpecError: return HttpResponseBadRequest("Invalid filter spec", contenttype="text/plain")

allowed = {"original", "width", "height", "min", "max", "fill"} if any(operation.method not in allowed for operation in filterobj.operations): return HttpResponseBadRequest("Invalid filter spec", contenttype="text/plain")

return preview(request, imageid, filterspec)

urlpatterns = [ # Example where the CMS admin is at /admin/. # Add this before the Wagtail admin URLs registration, with the same sub-path. path("admin/images/<int:imageid>/preview/<str:filterspec>/", patchedpreview) path("admin/", include(wagtailadminurls)), ]

Acknowledgements Many thanks to @0x1saac 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).

Affected Software

3 affected componentsFixes available
pip/wagtail>=7.4<7.4.2
7.4.2
pip/wagtail>=7.1<7.3.3
7.3.3
pip/wagtail<7.0.8
7.0.8

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/wagtail to a version that resolves this vulnerability.

    Fixed in 7.4.2
  2. Upgrade

    Upgrade pip/wagtail to a version that resolves this vulnerability.

    Fixed in 7.3.3
  3. Upgrade

    Upgrade pip/wagtail to a version that resolves this vulnerability.

    Fixed in 7.0.8
  4. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 7.0.8
  5. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 7.3.3
  6. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 7.4.2
  7. Configuration

    For sites that cannot upgrade, patch the vulnerability by adding the provided code to `urls.py` URL pattern declarations to override the vulnerable view: (1) include `path("admin/", include(wagtailadmin_urls))` before registering Wagtail admin URLs, with the same sub-path; (2) add `path("admin/images/<int:image_id>/preview/<str:filter_spec>/", patched_preview)` so that requests use the `patched_preview` function that rejects invalid filter specs (raising `PermissionDenied`/`HttpResponseBadRequest` when needed).

    Django/Wagtail (urls.py) URL pattern overrides for Wagtail image preview filters = Add a URL pattern that routes admin image preview with <str:filter_spec>/ to patched_preview and include Wagtail admin URLs under the same sub-path (e.g., path("admin/", include(wagtailadmin_urls))).

Event History

Aug 20, 2026
Advisory Published
via GitHub·06:40 PM
Data Sourced
via GitHub·06:40 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Who can exploit this issue?

Exploitation requires an authenticated user with access to the Wagtail admin. Ordinary site visitors without Wagtail admin access cannot exploit it.

2

Which releases contain fixes?

Patched releases are Wagtail 7.0.8, 7.3.3, and 7.4.2.

3

What can be done if an upgrade is not immediately possible?

Apply the provided workaround by adding the supplied patched preview-view override to the URL pattern declarations in urls.py. The workaround validates image change permission and rejects invalid filter specifications.

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