Django REST framework: JSONParser applies an attacker-named codec to the request stream (encode django-rest-framework)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.53 % · percentile 46 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- Affected products
- encode · django-rest-framework
- NVD status
- Awaiting Analysis
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.
Weaknesses (CWE)
- CWE-409 — Improper Handling of Highly Compressed Data (Data Amplification)
- CWE-770 — Allocation of Resources Without Limits or Throttling
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | GitHub_M |
| CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NVD · security-advisories@github.com (Secondary) |
Advisories
- GHSA-3547-9m27-7rxg — Django REST framework: JSONParser applies an attacker-named codec to the request stream
European references
- ENISA EUVD · EUVD-2026-107546
- GCVE · GCVE-0-2026-114136
CERT-FR advisories
- CERTFR-2026-AVI-1486 — Multiples vulnérabilités dans les produits VMware · cert.ssi.gouv.fr
Affected products
| Product | Affected versions |
|---|---|
| encode · django-rest-framework | affected : >= 3.6.4, < 3.18.2 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| CERT-FR (ANSSI) | Licence Ouverte / Etalab 2.0 |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |