Django Patches High-Severity RCE Flaw
Django released updates for seven vulnerabilities, including a high-severity RasterField flaw that can lead to remote code execution.
The Django project has pushed out security releases addressing seven vulnerabilities, two of them rated high severity. At the center of the advisory is a flaw in Django's RasterField component that, under certain conditions, lets an attacker write files to arbitrary locations on the server — a capability that can open the door to remote code execution.
The project is directing users to upgrade to 6.1.4, 6.0.11, or 5.2.20, depending on which release series they run, according to the security advisory. Snyk, which analyzed the flaw, said it was unaware of any reported exploitation of the remote code execution issue.
The RasterField write primitive
Tracked as CVE-2026-124827 and nicknamed Django4Shell by security researcher Mohammed Fathy of Robusta Technology Group, the flaw lives in RasterField, the model field Django uses to handle geospatial raster data in applications running on PostGIS. Under certain conditions, attackers could write files to locations of their choosing on the server, potentially enabling remote code execution.
The exposure is not limited to applications that deliberately accept raster uploads. Before the update, registering a model containing a RasterField in Django's administrative interface could make the field accessible through forms by default, even where developers had not intended to accept such input. Applications that expose RasterField through editable forms — including the admin — or through writable model serializers are in scope.
Snyk said that in most deployments, exploitation would require access to a staff or administrator account. Whether the file write actually leads to code execution depends on the application's filesystem permissions. Attackers who succeed could alter application code, and if they achieve code execution on the server, they could also reach credentials and other sensitive data available to the application.
SSRF persists after the patch
The update restricts unauthorized file writes, but Django warned that accepting untrusted raster data through an affected model field could still leave applications vulnerable to server-side request forgery (SSRF) even after upgrading. That caveat matters for anyone who treats the version bump as a complete fix.
The project has grappled with related spatial-query request forgery issues before. Django addressed unauthorized file writes and request forgery in spatial database queries in August, followed by an October fix for a related request forgery vulnerability overlooked in the earlier update. Neither patch covered the model field affected by the latest disclosure.
A second high-severity flaw
The other vulnerability Django rated high severity, CVE-2026-132092, could allow SQL injection under certain conditions when queries using its range or in lookups contain percent signs in aliases or key transforms. Unlike the RasterField issue, this one is not confined to applications using GeoDjango.
Snyk classified it as critical under the Common Vulnerability Scoring System (CVSS) 4.0, assigning a score of 9.3 out of 10. The company said attackers do not need prior privileges to exploit the flaw in susceptible applications.
The remaining fixes cover cache poisoning, cross-site scripting, a heap buffer overflow, and two information disclosure vulnerabilities in Django's administrative interface. Django advised users to clear potentially affected caches after upgrading, because the fix for the low-severity cache-poisoning vulnerability does not invalidate previously cached responses.
Who needs to look first
Akshat Tyagi, associate practice leader at HFS Research, said mapping platforms and government systems that rely on the affected geospatial functionality warrant particular attention.
“For CISOs, the immediate priority is to identify which applications use these affected features, especially where external users can submit data,” Tyagi said.
— Akshat Tyagi, associate practice leader at HFS Research
Lalit Rawat, CISO at Kanerika, said enterprises running affected GeoDjango applications should treat the remote code execution flaw as an emergency, and pushed back on the idea that the staff-account requirement makes it a minor concern.
“A staff account is a low bar,” Rawat said. “Admin logins get phished, and they often stay active long after people leave.”
— Lalit Rawat, CISO at Kanerika
Snyk also warned that older, unsupported Django versions should be treated as potentially vulnerable to Django4Shell if the conditions for exploitation are present. Django's security advisory covers only currently supported release series.
Inventory is the hard part
For enterprises relying on software composition analysis tools, identifying vulnerable Django versions is only part of the assessment. Determining whether an application is exploitable also requires examining its configuration and filesystem permissions, Rawat said.
“A simple test for any CISO is to ask which internet-facing apps run django.contrib.gis with the default admin,” Rawat said. “If that takes more than a day to answer, the inventory is the finding.”
— Lalit Rawat, CISO at Kanerika
Rawat also noted that enterprises must ensure background workers, scheduled jobs and older container images are not overlooked during the upgrade. Tyagi pointed to the same underlying problem from a different angle.
“The challenge is that many enterprises run older or heavily customized applications,” Tyagi said. “Finding every affected system and making these changes without disrupting business operations may be harder than installing the update.”
— Akshat Tyagi, associate practice leader at HFS Research
What the numbers say
- 7 vulnerabilities addressed in the release, 2 rated high severity
- CVE-2026-124827 — the RasterField file-write flaw, nicknamed Django4Shell
- CVE-2026-132092 — the SQL injection flaw, scored 9.3 out of 10 under CVSS 4.0
- Fixed versions: 6.1.4, 6.0.11, 5.2.20
Remediation beyond patching
Installing the update is the starting point, not the finish. Tyagi recommended reviewing application logs for signs of exploitation that may have occurred before the updates were installed. Rawat advised restricting web application processes from accessing sensitive internal services such as cloud metadata endpoints and making application code and software package directories read-only to those processes.
To detect potential exploitation, security teams should compare application files against a known-good build and look for unexpected Python startup files, Rawat said. Snyk advised enterprises that find evidence of exploitation of the file-write vulnerability to rotate credentials accessible to the Django process and rebuild affected systems from a trusted image.
The RasterField change itself can break legitimate workflows. Django has changed RasterField to be non-editable by default, meaning applications that legitimately collect raster data through forms may need to be modified and tested. Rawat recommended validating raster data before it reaches the affected field and requiring security approval before restoring the field's previous behavior.
Why it matters
The practical danger here is less about the novelty of the bug than about how ordinary the setup is: a Django admin, a geospatial field enabled by default, a staff account that may be shared or stale. Businesses running GeoDjango in mapping, logistics, or public-sector systems may find that the patch is the easy part and the inventory is the real work. The SSRF caveat means even upgraded applications that accept untrusted raster data may need additional controls, and the unsupported-version warning suggests some deployments could sit outside the advisory's coverage entirely. For security teams, this suggests two parallel tasks: confirm what is running, and confirm what the running code can reach. The organizations that answer the first question quickly are the ones best positioned to handle the second.
Sources
- CSO Online Original source
- security advisory Also reporting
Continue Reading
UltraMob Spyware Hid on App Store for Months
Italian spyware UltraMob stayed on the App Store for six months disguised as a network helper, using an Apple shortcut and a redeem code to activate.
OpenEMR flaw exploitation follows disclosure closely
VulnCheck's honeypots logged over 1,000 attacks on OpenEMR within 23 days of the first CVE batch, targeting eight flaws.
TeamCity build agents hijacked a day after patch
watchTowr says attackers began probing a critical TeamCity On-Premises auth bypass within a day of disclosure, aiming to seize build agents.