{
  "url": "https://tldrcve.com/django-2026-12-02/",
  "json": "https://tldrcve.com/django-2026-12-02.json",
  "verdict_label": "Patch now if…",
  "scare_label": "Check today",
  "slug": "django-2026-12-02",
  "name": "Django Dec release",
  "aliases": [
    "django",
    "django4shell",
    "geodjango",
    "django.contrib.gis",
    "rasterfield",
    "postgis",
    "gdal",
    "django admin",
    "django rce",
    "remote code execution",
    "file write",
    "sql injection",
    "truncatechars_html",
    "cache_page",
    "cache poisoning",
    "ogrgeometry",
    "python"
  ],
  "cves": [
    "CVE-2026-124827",
    "CVE-2026-132092",
    "CVE-2026-115868",
    "CVE-2026-125673",
    "CVE-2026-119642",
    "CVE-2026-127929",
    "CVE-2026-132809"
  ],
  "product": "Django",
  "disclosed": "2026-12-02",
  "updated": "2026-12-03",
  "verdict": "if",
  "tile_line": "Public exploit needs an editable GeoDjango RasterField.",
  "tldr": "Django fixed seven bugs on 2 Dec 2026. Django4Shell has a public exploit that writes files and can run code, but only via a GeoDjango RasterField users can edit; no attacks seen. The 9.8 SQL injection needs a specific query pattern; update Django.",
  "summary": "Django rates two bugs high (Django4Shell and the SQL injection), one moderate and four low. Mohammed Fathy reported Django4Shell; per the public exploit, GDAL writes the file before anything is saved and the code runs the next time Python starts, for example on a worker restart. Django's August and October fixes covered GeoDjango's spatial lookups, not assigning a value to RasterField.",
  "status": {
    "exploit": "public",
    "attacks": "none",
    "kev": null,
    "scare": 2.2
  },
  "status_cite": {
    "exploit": [
      4
    ],
    "attacks": [
      2,
      8
    ],
    "kev": [
      8
    ]
  },
  "affected": [
    {
      "label": "Django before 6.1.4 / 6.0.11 / 5.2.20",
      "text": "Every earlier 6.1, 6.0 and 5.2 release; all seven bugs need this. Django didn't evaluate its unsupported series (5.1, 5.0, 4.2 and older), which \"may also be affected\" and get no fixes. This checklist covers Django4Shell, the bug behind the verdict; the other six need other features: the `range` and `in` lookups, the `truncatechars_html` filter or `Truncator.chars(html=True)`, the cache middleware or `cache_page()`, the admin change list and GeoDjango's `OGRGeometry`.",
      "cmd": "python -m django --version",
      "cite": [
        1,
        2,
        6
      ]
    },
    {
      "label": "You use GeoDjango's RasterField",
      "text": "A model with `django.contrib.gis.db.models.RasterField`. It exists only on PostGIS; geometry fields aren't affected.",
      "cmd": "grep -rn \"RasterField\" --include=\"*.py\" .",
      "cite": [
        1
      ]
    },
    {
      "label": "Someone untrusted can edit it",
      "text": "RasterField was editable by default and fell back to a plain text form field, so it was reachable on any model registered in the admin or used in a ModelForm or writable serializer. Who can attack depends on who can submit that form: through the admin that's a staff login, which is what the public exploit uses; a form open to ordinary users or the public lowers the bar.",
      "cite": [
        1,
        2,
        4
      ]
    }
  ],
  "do": [
    {
      "label": "Upgrade to 6.1.4, 6.0.11 or 5.2.20",
      "text": "Released 2 Dec 2026, these fix all seven bugs. Django 4.2 LTS support ended on 7 Apr 2026 and 5.1 on 3 Dec 2025; they got no release, so move to a supported line. After upgrading, RasterField defaults to `editable=False` and is left out of a ModelForm unless explicitly included, and assigning a dict or JSON string with a non-default driver raises `GDALException`.",
      "versions": [
        "django"
      ],
      "cite": [
        1,
        9,
        6
      ]
    },
    {
      "label": "Can't upgrade yet: lock RasterField",
      "text": "The exploit's author suggests setting `editable=False` on each RasterField yourself (what the fix makes the default) or removing or restricting admin access to models that have one.",
      "cite": [
        4,
        1
      ]
    },
    {
      "label": "Validate raster input anyway",
      "text": "The fix stops file writes, not network requests: Django says server-side request forgery is still possible if untrusted input is assigned to RasterField, and to validate it before accepting it. To use another driver on purpose, wrap the trusted value in `GDALRaster`.",
      "cite": [
        1,
        5
      ]
    },
    {
      "label": "Cache users: clear caches",
      "text": "If you use the cache middleware or `cache_page()`, clear any caches that might be affected after upgrading: Django says responses already poisoned through dot segments in the path (CVE-2026-125673) aren't invalidated by the upgrade.",
      "cite": [
        1
      ]
    },
    {
      "label": "Read the scores with care",
      "text": "The 9.8 on the SQL injection is the CVSS 3.1 score in Django's CVE record; Django's own rating is high. The bug needs queries with aliases or key transforms containing percent signs, plus either more than two values passed to `__range` (a misuse) or a bilateral transform with `__in`; Django deprecated percent signs in aliases and key transforms in 6.0. Our reading: the 9.8 assumes that code is already in your app. Django4Shell is 8.8 there; the exploit's README says 9.0.",
      "cite": [
        3,
        1,
        2,
        4
      ]
    }
  ],
  "fixed_in": {
    "django": {
      "6.1": "6.1.4",
      "6.0": "6.0.11",
      "5.2": "5.2.20"
    }
  },
  "bugs": [
    {
      "cve": "CVE-2026-124827",
      "project": "Django",
      "severity": "high",
      "url": "https://www.djangoproject.com/weblog/2026/dec/02/security-releases/",
      "title": "Django4Shell: file write via RasterField",
      "text": "Only with GeoDjango's RasterField (PostGIS) editable in the admin, a ModelForm or a writable serializer. A crafted raster value with a non-default driver makes GDAL write a file where the attacker chooses; Django says this \"could enable remote code execution\" depending on the driver. A public exploit logs in as staff; no attacks reported.",
      "verdict": "if"
    },
    {
      "cve": "CVE-2026-132092",
      "project": "Django",
      "severity": "high",
      "url": "https://www.djangoproject.com/weblog/2026/dec/02/security-releases/",
      "title": "SQL injection in range and in lookups",
      "text": "Only in queries with aliases or key transforms containing percent signs, and then only with more than two values passed to `__range` (a misuse) or a bilateral transform on `__in`. The CVE record scores it 9.8; Django rates it high.",
      "verdict": "if"
    },
    {
      "cve": "CVE-2026-115868",
      "project": "Django",
      "severity": "medium",
      "url": "https://www.djangoproject.com/weblog/2026/dec/02/security-releases/"
    },
    {
      "cve": "CVE-2026-125673",
      "project": "Django",
      "severity": "low",
      "url": "https://www.djangoproject.com/weblog/2026/dec/02/security-releases/"
    },
    {
      "cve": "CVE-2026-119642",
      "project": "Django",
      "severity": "low",
      "url": "https://www.djangoproject.com/weblog/2026/dec/02/security-releases/"
    },
    {
      "cve": "CVE-2026-127929",
      "project": "Django",
      "severity": "low",
      "url": "https://www.djangoproject.com/weblog/2026/dec/02/security-releases/"
    },
    {
      "cve": "CVE-2026-132809",
      "project": "Django",
      "severity": "low",
      "url": "https://www.djangoproject.com/weblog/2026/dec/02/security-releases/"
    }
  ],
  "sources": [
    {
      "title": "Django: 2 Dec 2026 security releases, all seven bugs, ratings and fixed versions",
      "url": "https://www.djangoproject.com/weblog/2026/dec/02/security-releases/",
      "date": "2 Dec"
    },
    {
      "title": "CVE record CVE-2026-124827: Django \"high\", CVSS 8.8, CISA exploitation none, older series not evaluated",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-124827"
    },
    {
      "title": "CVE record CVE-2026-132092: Django \"high\", CVSS 9.8",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-132092"
    },
    {
      "title": "Joshua van der Poll: public Django4Shell exploit, staff login, runs on next restart",
      "url": "https://github.com/joshuavanderpoll/CVE-2026-124827",
      "date": "2 Dec"
    },
    {
      "title": "Django docs: GDAL raster security considerations, file writes blocked but not network requests",
      "url": "https://docs.djangoproject.com/en/stable/ref/contrib/gis/gdal/#security-considerations"
    },
    {
      "title": "Django: supported versions, 4.2 support ended 7 Apr 2026",
      "url": "https://www.djangoproject.com/download/"
    },
    {
      "title": "Django security archive: August and October fixes covered spatial lookups",
      "url": "https://docs.djangoproject.com/en/dev/releases/security/"
    },
    {
      "title": "CISA KEV catalog: none of the seven listed",
      "url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog"
    },
    {
      "title": "PyPI: Django 6.1.4, 6.0.11 and 5.2.20 released 2 Dec 2026",
      "url": "https://pypi.org/project/Django/#history"
    }
  ],
  "changes": [
    {
      "date": "2026-12-03",
      "text": "Published."
    }
  ],
  "safe_versions": [
    {
      "id": "django",
      "name": "Django",
      "url": "https://tldrcve.com/versions/django/",
      "json": "https://tldrcve.com/versions/django.json",
      "checked": "2026-12-03",
      "lines": [
        {
          "line": "6.1",
          "latest": "6.1.4",
          "released": "2026-12-02",
          "note": "Security fixes until December 2027."
        },
        {
          "line": "6.0",
          "latest": "6.0.11",
          "released": "2026-12-02",
          "note": "Security fixes until April 2027."
        },
        {
          "line": "5.2 LTS",
          "latest": "5.2.20",
          "released": "2026-12-02",
          "note": "Security fixes until April 2028."
        }
      ],
      "older": "Django 5.1 and older get no fixes: 4.2 LTS support ended on 7 Apr 2026 and 5.1 on 3 Dec 2025."
    }
  ]
}
