Apache · Apache · CVE-2023-28837
**Name of the Vulnerable Software and Affected Versions**
Wagtail versions prior to 4.1.4 and 4.2.2
**Description**
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.
**Recommendations**
For versions prior to 4.1.4, update to version 4.1.4 or later.
For versions prior to 4.2.2, update to version 4.2.2 or later.
As a temporary workaround, consider adding extra protections outside of Wagtail to limit the size of uploaded files, such as configuring `client max body size` in Nginx, `LimitRequestBody` in Apache, or using Cloudflare's or CloudFront's built-in limitations.