Allocation of Resources Without Limits or Throttling Affecting djangorestframework package, versions [3.6.4,3.18.2)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.34% (27th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-DJANGORESTFRAMEWORK-21431456
  • published22 Oct 2026
  • disclosed22 Oct 2026
  • creditDimitar Ganev, Jisung Chae

Introduced: 22 Oct 2026

NewCVE-2026-114136  (opens in a new tab)
CWE-409  (opens in a new tab)
CWE-770  (opens in a new tab)

How to fix?

Upgrade djangorestframework to version 3.18.2 or higher.

Overview

djangorestframework is a powerful and flexible toolkit for building Web APIs.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via JSONParser (and FormParser/MultiPartParser) in rest_framework/parsers.py, which passes the client-supplied charset from the Content-Type header directly to codecs.getreader() without validating that it is a text encoding. Because codecs.getreader() does not consult CodecInfo._is_text_encoding, a client can supply a byte-transform codec such as bz2_codec, causing the request body to be decompressed after Django's DATA_UPLOAD_MAX_MEMORY_SIZE check has already been applied against the compressed wire bytes. A 108-byte compressed payload can expand to over 50 million characters and approximately 97 MiB of peak RSS, exhausting server memory. Additionally, supplying certain byte-transform charsets with an invalid body raises uncaught OSError, TypeError, or LookupError exceptions, crashing the worker process with an unauthenticated HTTP 500 response.

CVSS Base Scores

version 4.0
version 3.1