CVE-2023-28837: Wagtail vulnerable to denial-of-service via memory exhaustion when uploading large files

Published Apr 3, 2023
·
Updated

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.

Other sources

Wagtail is an open source content management system built on Django. Prior to versions 4.1.4 and 4.2.2, 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 of 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.

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 are encouraged to add extra protections outside of Wagtail to limit the size of uploaded files.

— MITRE

Affected Software

4 affected componentsFixes available
pip/wagtail<4.1.4
4.1.4
pip/wagtail>=4.2<4.2.2
4.2.2
Torchbox Wagtail<4.1.4
Torchbox Wagtail>=4.2<4.2.2

Event History

Apr 3, 2023
CVE Published
via MITRE·04:41 PM
Data Sourced
via MITRE·04:41 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·07:18 PM

Frequently Asked Questions

1

What is CVE-2023-28837?

CVE-2023-28837 is a memory exhaustion vulnerability in Wagtail, an open source content management system built on Django.

2

How does CVE-2023-28837 affect Wagtail?

CVE-2023-28837 affects Wagtail versions 4.1.4 and 4.2.2, causing a memory exhaustion issue during the handling of uploaded images and documents.

3

What is the severity of CVE-2023-28837?

CVE-2023-28837 has a severity value of 4.9, which is considered medium.

4

How can I check if my version of Wagtail is affected by CVE-2023-28837?

You can check if your version of Wagtail is affected by CVE-2023-28837 by verifying if it is version 4.1.4 or 4.2.2.

5

How do I fix CVE-2023-28837?

To fix CVE-2023-28837, update your Wagtail installation to version 4.1.5 or 4.2.3 or later.

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