{
  "schemaVersion": "guard-threat-campaign/v1",
  "id": "HGTC-2026-C3E93742",
  "slug": "cve-2026-124827-django-geodjango-rasterfield-file-write",
  "title": "Django GeoDjango RasterField file write can reach code execution through a normal form (CVE-2026-124827)",
  "aliases": [
    "CVE-2026-124827",
    "Django4Shell"
  ],
  "summary": "Django's December 2, 2026 security release (6.1.4, 6.0.11, 5.2.20) fixes CVE-2026-124827, a high-rated flaw in GeoDjango: assigning a raster definition with an attacker-controlled name and a non-default driver to a RasterField can make GDAL write a file at an attacker-chosen path, and with some drivers that write can reach code execution. RasterField falls back to the CharField form field, so the path was reachable by default through the admin, ModelForms and writable serializers, with staff-level authentication as the main requirement, per reporter Mohammed Fathy (Django4Shell, CVSS 9.0). The flaw is the assignment path left over after the August 2026 (CVE-2026-15307) and October 2026 (CVE-2026-87890) fixes guarded spatial lookups in the same module. The same release fixes six more flaws, including CVE-2026-132092, a high-rated SQL injection in range and in lookups.",
  "status": "published",
  "severity": "high",
  "confidence": "high",
  "uncertainty": "No known exploitation was listed when Django published the release on December 2, 2026; HOL's Guard feed lists the flaw as not known to be exploited and the Django advisory names no exploitation. HOL did not reproduce the flaw; the account rests on the Django advisory and the reporter's account as reported by The Hacker News. The 9.0 score is the reporter's; Django rates the flaw high without a CVSS score in its advisory.",
  "firstObservedAt": "2026-12-02T00:00:00.000Z",
  "lastObservedAt": "2026-12-03T14:56:53.000Z",
  "publishedAt": "2026-12-03T15:13:10.531Z",
  "reviewedAt": "2026-12-03T15:12:37.779Z",
  "expiresAt": "2026-12-03T14:56:53.000Z",
  "reviewer": "HOL Guard Security Publishing",
  "sources": [
    {
      "id": "django-security-release",
      "label": "Django security releases issued December 2, 2026",
      "url": "https://www.djangoproject.com/weblog/2026/dec/02/security-releases/",
      "sourceType": "other_primary",
      "observedAt": "2026-12-02T00:00:00.000Z"
    },
    {
      "id": "thn-django4shell",
      "label": "The Hacker News on Django4Shell, December 2, 2026",
      "url": "https://thehackernews.com/2026/12/new-django4shell-vulnerability-enables.html",
      "sourceType": "other_primary",
      "observedAt": "2026-12-02T00:00:00.000Z"
    },
    {
      "id": "hol-blog",
      "label": "HOL Guard operator write-up",
      "url": "https://hol.org/blog/cve-2026-124827-django-geodjango-rasterfield-file-write",
      "sourceType": "other_primary",
      "observedAt": "2026-12-03T14:56:53.000Z"
    },
    {
      "id": "guard-evidence-page",
      "label": "HOL Guard evidence page for CVE-2026-124827",
      "url": "https://hol.org/guard/security/cves/CVE-2026-124827-server-side-file-write-via-rasterfield-assignment",
      "sourceType": "other_primary",
      "observedAt": "2026-12-02T00:00:00.000Z"
    }
  ],
  "artifacts": [
    {
      "id": "django-geodjango",
      "artifactClass": "package",
      "ecosystem": "generic",
      "name": "Django (GeoDjango RasterField, PostGIS only)",
      "version": "6.1 before 6.1.4, 6.0 before 6.0.11, 5.2 before 5.2.20 affected; fixed in 6.1.4, 6.0.11, 5.2.20",
      "defanged": false
    }
  ],
  "indicators": [],
  "timeline": [
    {
      "id": "august-lookup-fix",
      "occurredAt": "2026-08-01T00:00:00.000Z",
      "eventType": "other",
      "summary": "Django fixed CVE-2026-15307 in August 2026, covering file writes through spatial lookup raster parsing.",
      "sourceIds": [
        "django-security-release",
        "thn-django4shell"
      ]
    },
    {
      "id": "october-incomplete-fix",
      "occurredAt": "2026-10-01T00:00:00.000Z",
      "eventType": "other",
      "summary": "CVE-2026-87890, fixed in October 2026, was an incomplete patch for the August issue and opened a request forgery route through crafted raster payloads; the assignment path stayed open.",
      "sourceIds": [
        "thn-django4shell"
      ]
    },
    {
      "id": "vendor-advisory-published",
      "occurredAt": "2026-12-02T00:00:00.000Z",
      "eventType": "disclosure",
      "summary": "Django issued 6.1.4, 6.0.11 and 5.2.20 fixing seven flaws, led by CVE-2026-124827 in GeoDjango RasterField assignment.",
      "sourceIds": [
        "django-security-release"
      ]
    },
    {
      "id": "hol-blog-published",
      "occurredAt": "2026-12-03T14:56:53.000Z",
      "eventType": "other",
      "summary": "HOL Guard published the operator write-up with the scope, the checks, and the fix steps.",
      "sourceIds": [
        "hol-blog"
      ]
    }
  ],
  "coverage": [
    {
      "assertionId": "guard-evidence-pack",
      "relationship": "provides_evidence",
      "limitation": "The campaign rests on the Django advisory and the reporter's account as reported by The Hacker News, as carried in the HOL write-up; HOL did not reproduce the flaw."
    }
  ],
  "policies": [
    {
      "policyId": "upgrade-django-fixed-releases",
      "purpose": "Upgrade Django to 6.1.4, 6.0.11 or 5.2.20 for the line in use, because the release closes the RasterField assignment path and the six sibling flaws",
      "status": "available",
      "limitation": "Read the RasterField change before deploying: dict or JSON input naming a non-default driver now raises GDALException, so code that passes raw definitions must wrap them in GDALRaster first."
    }
  ],
  "limitations": [
    "RasterField exists only on PostGIS; geometry fields were not affected, and a Django app with no GeoDjango and no RasterField model has no exposure to this flaw",
    "An app that keeps RasterField out of the admin, ModelForms and writable serializers and never assigns untrusted input to it is not reachable through the default path",
    "The file-write path runs through admin, form or serializer machinery and, on the reporter's account, needs staff-level authentication; it is not an unauthenticated internet-facing flaw",
    "Unsupported Django series were not evaluated for these flaws and may also be affected"
  ],
  "correctionHref": "/guard/security/campaigns/cve-2026-124827-django-geodjango-rasterfield-file-write/corrections"
}
