PyPI: djangorestframework
CVE-2026-73228
Safety vulnerability ID: SFTY-20260901-43872
Affected versions of the Django REST Framework (DRF) package are vulnerable to Improper Input Validation due to bypassing Django's `DATA_UPLOAD_MAX_MEMORY_SIZE` protection when parsing oversized JSON and urlencoded request bodies via `request.data`. The `request.data` method in DRF allows parsers to consume the request stream directly through Django's lower-level streaming interface, which does not trigger the `RequestDataTooBig` protection that is enforced when using `request.body` or Django's native `request.POST`. An attacker can exploit this vulnerability by sending oversized JSON or URL-encoded request bodies to DRF endpoints, potentially leading to increased memory allocation and CPU usage, thereby reducing the effectiveness of resource consumption limits in affected deployments.
Overview
Django REST framework: Potential bypass of Django `DATA_UPLOAD_MAX_MEMORY_SIZE` when parsing oversized JSON and urlencoded request bodies via DRF `request.data`
Advisory
djangorestframework – Denial of Service (DoS)
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20260901-43872/CVE-2026-73228
- https://github.com/encode/django-rest-framework/security/advisories/GHSA-2m8g-3cmr-wg3w
- https://nvd.nist.gov/vuln/detail/CVE-2026-73228
- https://github.com/encode/django-rest-framework/pull/10013
- https://github.com/encode/django-rest-framework/commit/2912dc98042f78e27636551fc22eeaf10f725fdd
- https://github.com/encode/django-rest-framework/commit/82ef7b7e4e0a73ba5c489b465fae7e76d948da4e
- https://github.com/encode/django-rest-framework/releases/tag/3.17.2
- https://github.com/advisories/GHSA-2m8g-3cmr-wg3w
Verified by Safety
Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.
Learn more
