Django REST framework: JSONParser applies an attacker-named codec to the request stream
Impact
Django REST framework versions 3.6.4 to 3.18.2 have a weakness where an unauthenticated client can cause a small JSON request to consume substantial memory. The JSONParser uses a client-supplied codec, allowing compressed data to be expanded. This affects any endpoint that accepts a JSON body.
Summarized by @cf/meta/llama-3.3-70b-instruct-fp8-fast. Verify details against the original sources.Affected packages
Affected products
Vendor version evidence. Product records are separate from automatic dependency matching.
encode · GitHub_M
django-rest-framework
1 range
encode · GitHub_M
django-rest-framework
Compare with this publisher’s ranges. This does not inspect your installation.
affected
>= 3.6.4, < 3.18.2
Other versions: unknown
Original source description
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.
Inside the record
Evidence available
Describes the evidence in this view, not whether the product is safe.
Original records
CVE-2026-114136View the latest unmodified CVE JSON from the official source. It may be newer than this imported page.
cve.new JSON →Underlying weaknesses
The source’s classification of what caused the vulnerability.
Contributing organizations · 2
Assigning organization
Additional data publisher
What changed
Follow changesLarge field values are marked as truncated previews. Original source snapshots remain retained.