Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend tiny JSON request with charset=bz2_codec
-
ExploitPass DATA_UPLOAD_MAX_MEMORY_SIZE check on compressed wire bytes
-
ExecutionJSONParser decompresses body via byte-transform codec
-
ImpactExhaust per-worker memory causing denial of service
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Compression ratio limits
|
| Exploitation Conditions | No special conditions - remote unauthenticated exploitation against default configurations of Django REST framework (3.6.4 up to but not including 3.18.2), because JSONParser is part of the default parser set and any reachable endpoint accepting a JSON body is affected. Exploitation only requires the attacker to set a byte-transform codec (e.g. bz2_codec, zlib_codec, base64_codec) as the Content-Type charset and send a correspondingly compressed body. Limiting factors: the deployment must expose at least one JSON-accepting DRF endpoint; impact is bounded to per-worker memory pressure rather than host compromise; and an upstream proxy or WAF that strips or normalizes nonstandard Content-Type charset values could blunt the attack. DATA_UPLOAD_MAX_MEMORY_SIZE does not mitigate it because that limit is checked only against the compressed wire bytes before expansion. |
| Impact | All provided signals point to a genuine but bounded availability risk. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, base 7.5) is fully consistent with the description: a remote, unauthenticated attacker over the network, with low complexity and no user interaction, achieves a high availability impact and zero confidentiality or integrity impact (CWE-409, data amplification / resource consumption). This is a denial-of-service memory-exhaustion flaw, not a code-execution or data-exposure issue. No EPSS score, no CISA KEV listing, and no public POC were provided, so exploitation is currently 'no public exploit identified at time of analysis' - however, the GitHub advisory, fix commit, and 3.18.2 release notes are public and explain the mechanism in detail, which lowers the bar to reproduce it even though no weaponized exploit is cited. Reach is broad because the vulnerable JSONParser is in DRF's default parser set and any endpoint accepting a JSON body is affected, but the ceiling is lower than the raw 7.5 implies: impact is confined to per-worker memory pressure rather than host compromise, and deployments behind proxies or WAFs that strip or normalize unusual Content-Type charset parameters may be shielded. One input inconsistency must be flagged: the 'Information Disclosure' tag conflicts with the CVSS vector (C:N) and the description - this is an availability/DoS issue, so that tag is mislabeled. |
| Exploit ScenarioDerived | A remote unauthenticated attacker sends a very small HTTP request to any DRF endpoint that accepts JSON, setting the Content-Type charset parameter to a byte-transform codec such as bz2_codec and supplying a tiny highly-compressed body. Django enforces DATA_UPLOAD_MAX_MEMORY_SIZE only against the compressed wire bytes, so the limit passes, but JSONParser then expands the body through codecs.getreader, inflating it massively in memory; repeating this across workers exhausts per-worker memory and degrades or disables the API. No public exploit is cited, but the fix commit documents the mechanism precisely. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 21, 2026
Memory exhaustion in Django REST framework 3.6.4 through 3.18.1 lets a remote unauthenticated client make a single small JSON request balloon into a much larger in-memory body, degrading or crashing the worker that handles it. Because the affected JSONParser ships in the default parser set, any reachable DRF endpoint that accepts a JSON body is a candidate target - the attacker simply names a byte-transform codec such as bz2_codec in the request's Content-Type charset and sends a correspondingly compressed payload. Impact is limited to availability (CVSS 3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, 7.5) rather than confidentiality or integrity; no public exploit code was identified at time of analysis and there is no CISA KEV entry, so this is a genuine but bounded denial-of-service risk pending upgrade to 3.18.2.
RemediationAI
Vendor-released patch: upgrade Django REST framework to 3.18.2, which routes all parser charset handling through the new get_encoding() helper that rejects byte-transform codecs with a ParseError (fix commit 3c2634599b26a9f789b03045118dbc276117611a, advisory GHSA-3547-9m27-7rxg). If an immediate upgrade is not possible, the most effective compensating control is an edge layer - reverse proxy, load balancer or WAF - that strips or normalizes the charset parameter of Content-Type on API requests to a known text encoding such as utf-8, rejecting anything outside a whitelist; the trade-off is that legitimate clients using utf-16 or latin-1 bodies will break, and any bypass of the edge layer re-exposes the workers. Alternatively, subclass JSONParser (and FormParser/MultiPartParser) to validate parser_context['encoding'] against an allowlist before calling codecs.getreader, and roll it out via DEFAULT_PARSER_CLASSES - this requires code changes in every affected service and is easy to miss on new endpoints. Reducing per-worker memory limits and enforcing container/process memory caps (e.g. cgroup limits with restart) bounds blast radius but converts the attack into repeated worker restarts rather than preventing it, and do not rely on DATA_UPLOAD_MAX_MEMORY_SIZE, which is checked against the compressed wire bytes before expansion and does not mitigate this issue. Restricting JSON-accepting endpoints to trusted networks reduces exposure at the cost of functionality for public API consumers.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Django REST framework's parsers (JSONParser, FormParser and MultiPartParser) read the charset parameter from the client-supplied Content-Type header and passed it to codecs.getreader(). Python's codecs.lookup() resolves far more than text encodings - bz2_codec, zlib_codec, base64_codec, hex_codec, quopri_codec, uu_codec and even the zip alias are all valid codec names that transform bytes to bytes, i.e. they decompress or decode rather than character-decode. Django enforces DATA_UPLOAD_MAX_MEMORY_SIZE against the raw request body / wire bytes before the parser runs, so the size check happens on the compressed payload; the expansion then occurs inside the parser during decoding, after the guard has already passed. The result is a decompression-bomb style attack mapped to CWE-409 (Improper Handling of Highly Compressed Data). The upstream fix introduces a get_encoding() helper that resolves the charset from parser_context (falling back to settings.DEFAULT_CHARSET) and validates it with ''.encode(encoding), which - unlike codecs.getreader() - rejects non-text codecs, raising ParseError with 'Unsupported charset ...' for bz2, zlib, base64, hex, rot13, quopri, uu, zip and undefined/unknown encodings while continuing to accept utf-8, ascii, latin-1, utf-16 and utf-32.
Know when Django Rest Framework gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Remote unauthenticated request against the default parser with no interaction (AV:N/AC:L/PR:N/UI:N); memory exhaustion yields A:H only, with C:N/I:N.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Django REST framework is a toolkit for building Web APIs. From 3.6.4 until 3.18.2, JSONParser.parse in rest_framework/parsers.py uses the client-supplied Content-Type charset value with codecs.getreader, which accepts byte-transform codecs such as bz2_codec rather than only text encodings. A remote unauthenticated client can therefore cause a compressed JSON request body to be expanded after Django has enforced DATA_UPLOAD_MAX_MEMORY_SIZE against only the wire bytes, allowing a very small request to consume substantial per-worker memory. The default parser set is sufficient, and any reachable endpoint that accepts a JSON body is affected. This issue is fixed in version 3.18.2.
Technical POC Analysis
CWE-409 (Improper Handling of Highly Compressed Data / data amplification), secondarily CWE-770 (Allocation of Resources Without Limits or Throttling).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Django REST framework versions 3.6.4 through 3.18.1 expose a high-severity availability risk: an unauthenticated remote client can send a specially crafted JSON request that expands in memory and degrades or crashes the handling worker. Leadership should care because any reachable DRF endpoint using the default JSON parser may be disrupted, although the issue affects availability only and no public exploit was identified at time of analysis. There is no CISA KEV entry, so this is a bounded but operationally relevant denial-of-service exposure pending upgrade to 3.18.2.
No vendor-released patch identified at time of analysis. Interim controls: restrict or disable DRF JSONParser on endpoints that do not need JSON bodies; enforce strict Content-Type validation and allow only UTF-8 charset; reject byte-transform codecs such as bz2_codec; set request body and decompression size limits at the reverse proxy or WAF; rate-limit and monitor memory/worker health; isolate or recycle affected workers.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
More in Django Rest Framework
View allUncontrolled resource consumption in Django REST Framework prior to 3.17.2 allows unauthenticated remote attackers to ex
Denial of service in Django REST Framework prior to 3.18.2 allows a remote unauthenticated client to pin synchronous wor
Failed token revocation in Django REST Framework 3.12.0 through 3.18.1 leaves API credentials live after they are suppos
A flaw was found in Django REST Framework versions before 3.12.0 and before 3.11.2. Rated medium severity (CVSS 6.1), th
EUVD-2026-107546
GHSA-3547-9m27-7rxg
NVD
CVE.org
EPSS
VulDB
Exploit-DB