CVE-2023-28837: Wagtail Wagtail Vulnerable To Denial-of-service Vulnerability
MODERATECVE-2023-28837 is a MODERATE (CVSS 4.4) wagtail vulnerable to denial-of-service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Wagtail libraries in the PyPI ecosystem. The issue involves wagtail vulnerable to denial-of-service via memory exhaustion when uploading large files. Remediation is available by upgrading affected packages to version 4.2.2, 4.1.4.
CVE-2023-28837 at a Glance
Security Impact
CVSS: 4.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2023-28837
To remediate this vulnerability, upgrade all affected Wagtail dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install wagtail>=4.2.2
pip install wagtail>=4.1.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show wagtail
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2023-28837, inspect your installed packages using pip:
pip show wagtail
Analyze the terminal output to locate any version of Wagtail in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.2.2), your application is affected.
Note: The pip show wagtail command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Wagtail, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-28837 Affected Wagtail Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
wagtail
|
PyPI |
≥ 4.2
< 4.2.2
|
4.2.2
|
|
wagtail
|
PyPI |
< 4.1.4
|
4.1.4
|
References
Frequently Asked Questions
What is CVE-2023-28837?
Which Wagtail versions are affected?
What version fixes CVE-2023-28837?
Is wagtail affected?
What is the CVSS score of CVE-2023-28837?
What CWE is associated with CVE-2023-28837?
How can I check PyPI dependencies for CVE-2023-28837?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-33pv-vcgh-jfg9",
"modified" : "2024-11-19T16:24:55Z",
"published" : "2023-04-03T19:18:09Z",
"aliases" : [ "CVE-2023-28837" ],
"summary" : "Wagtail vulnerable to denial-of-service via memory exhaustion when uploading large files",
"details" : "### Impact\n\nA 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.\n\nThe 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.\n\nImage uploads are [restricted to 10MB by default](https://docs.wagtail.org/en/stable/reference/settings.html#wagtailimages-max-upload-size), however this validation only happens on the frontend and on the backend after the vulnerable code. \n\n### Patches\n\nPatched 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).\n\n### Workarounds\n\nSite 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:\n\n- Nginx: [`client_max_body_size`](https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size)\n- Apache: [`LimitRequestBody`](https://httpd.apache.org/docs/2.4/mod/core.html#limitrequestbody)\n- Cloudflare: Already [imposes a limit of 100MB - 500MB](https://developers.cloudflare.com/cache/about/default-cache-behavior#customization-options-and-limitations) depending on plan\n- CloudFront: [`SizeConstraint`](https://docs.aws.amazon.com/waf/latest/APIReference/API_SizeConstraintStatement.html)\n- Traefik: [`traefik.http.middlewares.limit.buffering.maxRequestBodyBytes`](https://doc.traefik.io/traefik/middlewares/http/buffering/#maxrequestbodybytes)\n\nThe changes themselves are deep inside Wagtail, making patching incredibly difficult.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "wagtail"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.2"
}, {
"fixed" : "4.2.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "wagtail"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.1.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/wagtail/wagtail/security/advisories/GHSA-33pv-vcgh-jfg9"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-28837"
}, {
"type" : "WEB",
"url" : "https://github.com/wagtail/wagtail/commit/3c0c64642b9e5b8d28b111263c7f4bddad6c3880"
}, {
"type" : "WEB",
"url" : "https://github.com/wagtail/wagtail/commit/c9d2fcd650a88d76ae122646142245e5927a9165"
}, {
"type" : "WEB",
"url" : "https://github.com/wagtail/wagtail/commit/cfa11bbe00dbe7ce8cd4c0bbfe2a898a690df2bf"
}, {
"type" : "WEB",
"url" : "https://github.com/wagtail/wagtail/commit/d4022310cbe497993459c3136311467c7ac6329a"
}, {
"type" : "WEB",
"url" : "https://docs.wagtail.org/en/stable/reference/settings.html#wagtailimages-max-upload-size"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/wagtail/PYSEC-2023-56.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/wagtail/wagtail"
}, {
"type" : "WEB",
"url" : "https://github.com/wagtail/wagtail/releases/tag/v4.1.4"
}, {
"type" : "WEB",
"url" : "https://github.com/wagtail/wagtail/releases/tag/v4.2.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400", "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-04-03T19:18:09Z",
"nvd_published_at" : "2023-04-03T17:15:00Z"
}
}