Skip to main content

Django REST framework CVE-2026-114136

| EUVDEUVD-2026-107546 HIGH
Improper Handling of Highly Compressed Data (Data Amplification) (CWE-409)
2026-10-21 GitHub_M GHSA-3547-9m27-7rxg
7.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send tiny JSON request with charset=bz2_codec
  2. Exploit
    Pass DATA_UPLOAD_MAX_MEMORY_SIZE check on compressed wire bytes
  3. Execution
    JSONParser decompresses body via byte-transform codec
  4. Impact
    Exhaust 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

django-rest-framework 3.6.4, < 3.18.2

Affected Packages

euvd django_rest_framework fix: 3.18.2

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

Vendor (GitHub_M) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.5 HIGH

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.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

2
Patch available
Oct 21, 2026 - 21:18 EUVD
CVE Published
Oct 21, 2026 - 20:02 cve.org
HIGH 7.5

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.3%
Top 74% exploitable
Prevalence
High
Django REST framework is a dominant, widely-deployed Python web API toolkit
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy