Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2026-124827: Django4Shell

Published Dec 2, 2026 · Updated today
Trending this week#12of 439,515 vulnerabilities
Mention activity · 30 days66 mentions · peak 47 in a dayToday
CVSS8.7High · v4
EPSS-30-day exploit probability
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
IdentifiersCVE-2026-124827CWE-73 · External Control of File Name or…

Django4Shell is an external control of file name or path vulnerability in GeoDjango's django.contrib.gis.db.models.RasterField. Attacker-controlled raster definitions supplied as dictionaries or JSON strings can specify a name and a non-default GDAL driver, causing GDAL to create files at attacker-selected locations. File-backed drivers interpret the name as a destination rather than an in-memory label. The vulnerable conversion can occur during raster attribute evaluation or form validation, without a database write or model.save() call. Depending on the driver and filesystem permissions, the file-write primitive can enable remote code execution. Affected supported releases are Django 5.2 before 5.2.20, 6.0 before 6.0.11, and 6.1 before 6.1.4. Unsupported series, including 4.2, 5.0, and 5.1, were not evaluated and may also be affected. RasterField is supported only on PostGIS; geometry fields are unaffected.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation permits attacker-controlled file creation and potentially modification of application code or configuration within locations writable by the Django process. If a written file is subsequently loaded or executed, an attacker may obtain code execution with the application's operating-system privileges. Consequences can include disclosure of application secrets and data, unauthorized data modification, service disruption, persistence, and further host or network compromise. Remote code execution is conditional on the available GDAL driver, writable destinations, and subsequent loading or execution of the planted content.

Mitigation

If you can’t patch tonight, do this now.

Until patching is possible, disable untrusted raster submissions and exclude RasterField from Django admin forms, ModelForms, and writable serializers. Set editable=False, but also block direct assignment of unvalidated input because form exclusion does not protect custom assignment paths. Restrict raster-editing interfaces to trusted users, protect administrative access with multifactor authentication and network restrictions, and limit available GDAL raster drivers. Run Django with minimal filesystem privileges and make application code and Python package directories read-only where feasible. Review raster submissions and unexpected file modifications for signs of attempted or successful exploitation.

Remediation

Patch, then assume compromise.

Upgrade to Django 5.2.20, 6.0.11, or 6.1.4, or a later supported patched release. Migrate unsupported installations to a supported patched branch. Rebuild and redeploy affected application images and verify the running Django version. The fix makes RasterField non-editable by default and rejects dictionary or JSON raster definitions specifying drivers other than the in-memory MEM driver. Test raster-editing workflows for compatibility. Explicit GDALRaster construction with other drivers should be reserved for trusted, validated definitions. Continue validating raster input after upgrading because the file-write fix does not eliminate server-side request forgery risks. If exploitation is confirmed, rebuild affected hosts from known-good images and rotate application-accessible secrets; upgrading alone does not remove planted files.

Public exploits

Exploits

3 exploits validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit.

View more in app →
CVE-2026-124827The repository contains a standalone Python file-write exploit, a smaller fully visible reproduction, authenticated Nmap and Nuclei detection integrations, and a Dockerized GeoDjango/PostGIS lab. It is not itself a framework module, so the analysis covers the supplied repository. Of 26 files, 14 are nonempty source, script, build, or YAML configuration/template files; three additional Python package markers are empty. Supporting files include dependency lists, documentation, licensing, and an asset placeholder. The minimal exploit authenticates to Django admin using staff/staffpass, obtains CSRF cookies, fetches /admin/poc/rasterdemo/add/, and posts JSON describing an EHdr raster whose dataset name and band bytes specify the intended filesystem output. The claimed vulnerability occurs when RasterField assignment constructs a GDALRaster before database persistence. The main Python tool visibly supports authentication, target normalization, header-based OS heuristics, batch checks, and a configurable write mode, but its central implementation is truncated in the supplied material and cannot be fully audited. The Nmap script and Nuclei template perform authenticated form inspection rather than file writes. They infer vulnerability from the presence of a configurable field name or element ID; this does not establish that the field is actually a vulnerable RasterField, that GDAL permits the write, or that the claimed version is installed. They can therefore produce false positives. The Nmap script also initializes unsuccessful checks as NOT_VULN, potentially conflating authentication or connectivity failures with a negative result. The lab pins Django 5.2.19, installs GDAL-related system packages, registers a RasterDemo model with the default admin, creates PostGIS extensions, and launches Django's development server. Its account named staff is actually provisioned as a superuser. These lab settings are intentionally insecure and do not establish exploitability with every ordinary staff account. The visible payload is a benign file-write marker, not a shell. The README's RCE claim requires additional conditions and a working executable-file placement technique: the demonstrated EHdr output has a .bil extension, whereas the proposed Python startup hooks require suitable filenames and locations. Neither end-to-end RCE nor the cited CVE, release versions, advisory references, and CVSS claims were independently verified. There is no affirmative evidence of a malicious fake exploit in the supplied code, but execution success is unproven. The minimal script merely prints the HTTP status and expected filename. The main script's session.timeout assignment also does not, by itself, enforce timeouts in requests. No exfiltration or command-and-control endpoint is visible. Repository ref and archive size were not supplied; the empty ref and zero size are placeholders for unavailable metadata.joshuavanderpoll · Disclosed Dec 2, 2026 · python · lua · webOperationalCVE-2026-124827-PoC-and-LabThis is a standalone educational exploitation lab, not a Metasploit, Nuclei, or Sigma exploit module. Its 28 files include 11 nonempty Python files, three empty Python package initializers, one Bash entrypoint, three HTML templates, Docker/Compose definitions, dependency lists, and teaching/documentation material. The code-file count includes nonempty application, template, and infrastructure code. The main attack tools are poc/generate_payload.py and poc/send_poc.py. The generator encodes Python source as one-row Byte raster data for GDAL's EHdr driver. The sender establishes a staff session, uses lab status information to discover the interpreter's site-packages path, and is designed to submit the raster, trigger a restart, poll for command output, and verify self-deletion. Portions of the supplied sender and documentation are truncated, so not every intermediate implementation detail is available. The app/ tree implements a cadastral Parcel model with an exposed RasterField, a ModelForm, authentication, and lab-only observation/restart/cleanup views. The claimed vulnerability chain is form.is_valid() -> model field assignment/access -> SpatialProxy -> GDALRaster -> GDAL file creation. The repository attributes the missing protection to the assignment path, contrasting it with lookup-path safeguards. The intended write occurs before model.save(), so a raster database table is not necessary for that primitive. Writing sitecustomize.py then converts the file write into execution when a subsequent Python process imports the startup hook. Docker Compose supplies PostGIS and a Django development server, published only on host loopback. The container has no USER directive and therefore normally runs as root, making its site-packages writable. Deliberately unsafe settings include DEBUG=True, wildcard allowed hosts, a fixed secret key, and known training credentials. The restart endpoint is a classroom convenience, not an inherent capability against arbitrary production deployments. Real admin access may also require model permissions; the lab's custom form checks staff status directly. The default payload runs id, appends its output with marker '[Django4Shell PoC - NON DESTRUCTIVE]', and deletes its own source and GDAL companions. However, --cmd makes the generated command configurable, and the arbitrary-write primitive can overwrite existing writable files. Thus the documentation's unconditional non-destructive claims should not be treated as a technical guarantee. There is no supplied reverse shell, external callback, or built-in network exfiltration. Useful fingerprints include the sender User-Agent 'django4shell-poc/1.0 (educational lab)', the PoC marker, the canary path, and a same-basename Python/.hdr/.prj file triplet. README.md, WORKSHEET.md, TEACHER_SOLUTIONS.md, and DETECTION.md provide chain explanations, exercises, proposed detection rules, and remediation guidance. Embedded Sigma examples are defensive documentation and do not make this a framework exploit. The repository claims CVE-2026-124827 and fixes in Django 6.1.4, 6.0.11, and 5.2.20; these identifiers, releases, and runtime behavior were not independently verified. The repository URL, git reference, and archive size were not supplied; empty strings and zero represent unavailable metadata.linoMlv · Disclosed Dec 2, 2026 · python · bash · webOperationalCVE-2026-124827The repository contains a standalone Python exploit and a Dockerized Django demonstration application. Its claimed target is CVE-2026-124827, an arbitrary-file-write issue in GeoDjango RasterField processing. Static inspection supports the intended exploit mechanism, but neither the CVE attribution nor the claimed Django release behavior was independently verified or executed. exploit.py uses only Python's standard library. It maintains session cookies, obtains CSRF tokens, authenticates with configurable credentials, and submits an EHdr raster definition to either /submit/ or /admin/geoapp/tile/add/. The raster represents Python source as byte-valued pixels, with its name specifying the desired filesystem destination. The intended write occurs during form.is_valid(), before model saving. An HTTP error after submission is therefore not treated as proof that the write failed. The default payload plants sitecustomize.py in Python 3.13's site-packages directory. It executes an operator-selected command, defaulting to id, on a later interpreter startup. Automatic confirmation is lab-specific: the script uses local Docker Compose access to read the destination, launch a fresh Python process, and read the canary output. Thus the HTTP stage provides the intended file-write primitive, while the demonstrated execution trigger is not a separate remote-only capability. No reverse shell, external callback, or exfiltration destination is included. The --check mode verifies authentication and reachability only. The 20 supplied files include ten Python files, one Bash script, and one HTML template, counted as 12 code/template files. geoapp/ supplies the Tile model, RasterForm, staff-gated submission view, and default admin registration. manage.py, settings.py, and urls.py form the Django project. entrypoint.sh initializes authentication-related tables, creates a demo superuser, and starts the development server; it deliberately does not migrate the raster-bearing application. Two Dockerfiles and two Compose files provide claimed vulnerable Django 6.1.3 and fixed 6.1.4 environments. The patched build explicitly re-enables field editing to exercise the claimed assignment guard. Documentation additionally claims fixes in 6.0.11 and 5.2.20, without supplying corresponding environments. Notable limitations and risks include the writable startup-path requirement, dependency on a subsequent interpreter launch, fixed demonstration credentials, DEBUG=True, wildcard ALLOWED_HOSTS, and host port mappings without an explicit loopback restriction. The default startup-hook write can overwrite an existing file and persist within the container despite the documentation's benign-canary terminology. No clear evidence of a fake exploit or concealed malicious behavior is present. The original repository URL, Git reference, and archive size were not supplied; their fields use empty or zero placeholders.kaizensecurity · Disclosed Dec 3, 2026 · python · bash · webOperational
FAQ

Frequently asked questions

Is CVE-2026-124827 exploited in the wild?
As of Dec 3, 2026, Mallory has no reports of CVE-2026-124827 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2026-124827?
Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2026-124827, the earliest disclosed Dec 2, 2026.
Is there a patch for CVE-2026-124827?
Upgrade to Django 5.2.20, 6.0.11, or 6.1.4, or a later supported patched release. Migrate unsupported installations to a supported patched branch.
How severe is CVE-2026-124827?
CVE-2026-124827 has a CVSS v4 score of 8.7 (High) as of Dec 3, 2026.
Activity feed

Recent activity

70 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
csirt italiaNews · Dec 3, 2026Django: disponibile PoC per la CVE-2026‑124827 - ACNA vulnerability in Django's django.contrib.gis RasterField improperly handles the name parameter in assigned data. A remote attacker with limited privileges can supply a crafted path to create files in arbitrary locations and, depending on the raster driver used, execute arbitrary code. The reported CVSS v4.0 score is 8.7. A public proof of concept is available.Read more ↗csirt bjNews · Dec 3, 2026Multiples vulnérabilités affectant Django - bjCSIRTThe advisory describes a CVSS 8.8 insufficient-validation vulnerability in Django's RasterField component that permits arbitrary file creation. An authenticated attacker could achieve remote code execution depending on the raster driver used. The advisory lists affected releases as Django 6.1 before 6.1.4, 6.0 before 6.0.11, and 5.2 before 5.2.20; unsupported versions may also be affected. It recommends upgrading and validating and restricting user inputs related to query parameters and data definitions.Read more ↗darkwebinformerNews · Dec 2, 2026Daily Dose of Dark Web Informer - December 2, 2026A Django vulnerability allowing arbitrary file writes that could potentially lead to remote code execution.Read more ↗cycode blogNews · Dec 2, 2026Django4Shell (CVE-2026-124827): Affected Versions, How to Check and Fix | CycodeA high-severity arbitrary file-write vulnerability in GeoDjango’s RasterField that can lead to remote code execution depending on the GDAL driver. Applications are exposed when they accept user-controlled raster values through a RasterField on PostGIS. Affected supported versions are Django 5.2 before 5.2.20, 6.0 before 6.0.11, and 6.1 before 6.1.4; unsupported branches were not evaluated and may also be affected. The article reports CVSS 3.1 and 4.0 scores of 8.8 and 8.7, respectively. Updates are available; interim measures include setting editable=False and validating untrusted raster input. The article says Django does not report exploitation, without definitively establishing that no exploitation has occurred.Read more ↗
+11 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity54Community discussion across Reddit, Mastodon, and other social sources.