CVE-2026-114136

Django REST framework: JSONParser applies an attacker-named codec to the request stream

State
Published
Severity
7.5 High
Published
Oct 21, 2026
Updated
Oct 30, 2026
Reserved
Oct 20, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.17.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HGitHub_M

Weaknesses

  • CWE-409 Improper Handling of Highly Compressed Data (Data Amplification)
  • CWE-770 Allocation of Resources Without Limits or Throttling

Affected Products

ProductVersions
django-rest-frameworkencode
  • >= 3.6.4, < 3.18.2Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.