Django urges immediate upgrades after discovery of high-severity RCE flaw

Wait 5 sec.

The developers of Django, an open-source Python web framework, released security updates to address seven vulnerabilities, including two rated high severity. The project warned that applications accepting untrusted raster data through an affected model field could remain vulnerable to server-side request forgery even after upgrading.Django urged users in a security advisory to upgrade to version 6.1.4, 6.0.11, or 5.2.20, depending on their release series. Cybersecurity company Snyk said it was unaware of any reported exploitation of the remote code execution flaw.One of the high-severity flaws, tracked as CVE-2026-124827, affects Django’s RasterField, a component used 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 flaw can affect applications that expose RasterField through editable forms, including Django’s administrative interface, or through writable model serializers. In most deployments, exploitation would require access to a staff or administrator account, according to Snyk. Whether the file write leads to code execution also depends on the application’s filesystem permissions.Attackers exploiting the vulnerability, named Django4Shell by security researcher Mohammed Fathy of Robusta Technology Group, could alter application code, according to Snyk. If they succeed in executing code on the server, they could also access credentials and other sensitive data available to the application.The update restricts unauthorized file writes, but Django warned that accepting untrusted input through RasterField could still expose applications to server-side request forgery (SSRF).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.The other vulnerability Django rated as 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.The flaw is not confined to applications using GeoDjango. Snyk classified it as critical under the Common Vulnerability Scoring System (CVSS) 4.0, assigning it 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 address cache poisoning, cross-site scripting, a heap buffer overflow, and two information disclosure vulnerabilities in Django’s administrative interface.Assessing enterprise exposureMapping platforms and government systems that rely on the affected geospatial functionality warrant particular attention, according to Akshat Tyagi, associate practice leader at HFS Research.“For CISOs, the immediate priority is to identify which applications use these affected features, especially where external users can submit data,” Tyagi said.Lalit Rawat, CISO at Kanerika, said enterprises running affected GeoDjango applications should treat the remote code execution flaw as an emergency.“A staff account is a low bar,” Rawat said. “Admin logins get phished, and they often stay active long after people leave.”The exposure extends beyond applications that deliberately accept raster data. 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.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.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.”Remediation beyond patchingDjango 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.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, he 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.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.Enterprises must also ensure that background workers, scheduled jobs and older container images are not overlooked during the upgrade, Rawat said.“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.”