CVE-2023-28837: Wagtail denial-of-service via memory exhaustion in file upload

CVE-2023-28837 · Severity: low · CVSS 3.1 · Published 2023-04-03

Wagtail is a content management system and website builder used by organizations to manage web content. When an authenticated admin user uploads a file through the admin interface, Wagtail loads the entire file into memory for processing. An attacker with admin access could upload an extremely large file to consume all available memory, crashing the application and denying service to legitimate users. This requires privileged access, limiting exposure to trusted admin accounts.

Technologies: wagtail (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2023-28837 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2023-28837 being exploited in the wild.
How severe is CVE-2023-28837?
Low severity, with a CVSS score of 3.1, published 3 April 2023.
Which products and versions are affected?
wagtail (PyPI) ECOSYSTEM:introduced=4.2,fixed=4.2.2, GIT:introduced=0,fixed=cfa11bbe00dbe7ce8cd4c0bbfe2a898a690df2bf,fixed=3c0c64642b9e5b8d28b111263c7f4bddad6c3880,fixed=c9d2fcd650a88d76ae122646142245e5927a9165,fixed=d4022310cbe497993459c3136311467c7ac6329a|ECOSYSTEM:introduced=4.2,fixed=4.2.2,introduced=0,fixed=4.1.4.
Is there a fix for CVE-2023-28837?
Yes. wagtail (PyPI): upgrade to 4.1.4, 4.2.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2023-28837 attacked?
It is attacked over the network.
Am I affected by CVE-2023-28837?
Check whether you run wagtail (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • wagtail (PyPI): upgrade to 4.1.4, 4.2.2 or later
    pip install "wagtail>=4.2.2"

Technical details

The vulnerability is an uncontrolled resource consumption (CWE-400/CWE-770) issue in Wagtail's file upload handling. When images or documents are uploaded through the admin interface, the entire file is loaded into memory for additional processing before size validation occurs. An authenticated admin user with permission to upload images or documents can trigger a denial-of-service by uploading a file large enough to exhaust server memory and crash the application. Default frontend validation of 10MB for images does not prevent the vulnerability, as the backend loads files before checking the limit. The attack requires authentication and privileged file-upload permissions. Patches are available in Wagtail 4.1.4 and 4.2.2.

Affected products

  • Torchbox Wagtail < 4.1.4, 4.2, 4.2.1

Identifiers

  • CVE-2023-28837
  • GHSA-33pv-vcgh-jfg9
  • PYSEC-2023-56

Timeline

  • 2023-04-03: disclosed
  • 2023-04-03: patched: Wagtail 4.1.4 and 4.2.2

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.