Skip to content
Heist/ feed
Back to feed
High

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

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-114136
Confirmed fixed CVEs
Not specified
Updated in this feed
8 Nov 2026, 01:46 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 21 Oct 2026, 20:02 UTC

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.

osv:CVE-2026-114136
Complete source record
{
  "id": "942f335ebed43ad0f1b2698b9e1001e3cd30df720af7e6ca42c5ff2bce10162d",
  "url": "https://osv.dev/vulnerability/CVE-2026-114136",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Django REST framework: JSONParser applies an attacker-named codec to the request stream",
    "summary": "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.",
    "evidence": "osv:CVE-2026-114136",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-114136",
      "aliases": [
        "CVE-2026-114136",
        "GHSA-3547-9m27-7rxg"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/encode/django-rest-framework",
              "type": "GIT",
              "events": [
                {
                  "introduced": "fed85bc29d7965749e86ee86c63d140f2e50e843"
                },
                {
                  "fixed": "69694a17d0b6ac14b4ea4d77916b73c68dc5a3e8"
                },
                {
                  "fixed": "3c2634599b26a9f789b03045118dbc276117611a"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "3.6.4"
                      },
                      {
                        "fixed": "3.18.2"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "3c2634599b26a9f789b03045118dbc276117611a"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "69694a17d0b6ac14b4ea4d77916b73c68dc5a3e8"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "3.18.2"
                  }
                ]
              }
            }
          ],
          "versions": [
            "3.18.1",
            "3.18.0",
            "3.17.1",
            "3.17.0",
            "3.16.1",
            "3.16.0",
            "3.15.2",
            "3.15.1",
            "3.15.0",
            "3.14.0",
            "3.13.1",
            "3.13.0",
            "3.12.4",
            "3.12.3",
            "3.12.1",
            "3.12.0",
            "3.11.0",
            "3.10.3",
            "3.10.2",
            "3.10.1",
            "3.10.0",
            "3.9.3",
            "3.9.2",
            "3.9.1",
            "3.8.2",
            "3.8.1",
            "3.8.0",
            "3.7.7",
            "3.7.6",
            "3.7.5",
            "3.7.4",
            "3.7.3",
            "3.7.2",
            "3.7.1",
            "3.7.0",
            "3.6.4"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-114136.json"
          }
        }
      ],
      "modified": "2026-11-01T02:30:36.672077807Z",
      "provider": "osv",
      "references": [
        "https://github.com/encode/django-rest-framework/releases/tag/3.18.2",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/114xxx/CVE-2026-114136.json",
        "https://github.com/encode/django-rest-framework/security/advisories/GHSA-3547-9m27-7rxg",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-114136",
        "https://github.com/encode/django-rest-framework/commit/3c2634599b26a9f789b03045118dbc276117611a"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-409",
          "CWE-770"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/114xxx/CVE-2026-114136.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-114136",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 521480,
  "published_at": "2026-10-21T20:02:41.03+00:00"
}