Home / News / Article
SecurityWeek · 2 min read

Django Patches ‘Django4Shell’ Flaw Leading to RCE

New Django security updates resolve a high-severity vulnerability that could lead to remote code execution (RCE).

Django is a free, open source Python-based web framework that uses a model-template-views (MTV) architecture to help developers easily build applications.

On Wednesday, the web framework’s maintainers released Django versions 6.1.4, 6.0.11, and 5.2.20 to fix seven security bugs, including CVE-2026-124827 (CVSS score of 8.8), dubbed Django4Shell, an RCE issue with publicly available proof-of-concept (PoC) details.

The security defect impacts Django’s GeoDjango RasterField component, where user-controlled raster data is insufficiently validated, allowing an authenticated attacker to write arbitrary files to the server.

The attacker could exploit the flaw to write files to any accessible path on the system, potentially enabling RCE through multiple vectors.

“Because RasterField falls back to the CharField form field, the flaw was reachable by default on models with RasterField registered in the admin or using ModelForms or writable model serializers,” Django’s maintainers explain.

The security defect is an incomplete fix for CVE-2026-87890, a server-side request forgery (SSRF) patched in October, which in turn is an incomplete fix for CVE-2026-15307, a server-side file-write and request forgery bug patched in August.

“The protections from earlier patches do not extend to the RasterField assignment path, making this a persistent and recurring attack surface that the Django team has now addressed more thoroughly,” Orca Security explains.

Any GeoDjango application running on PostGIS that defines a RasterField may be vulnerable, especially those exposing RasterField via the Django admin, ModelForms, or writable model serializers.

According to Orca, attackers could exploit Django4Shell through a crafted JSON raster body that has a user-controlled ‘name’ parameter and a non-default GDAL driver. Attackers could drop Python files into the working directory, write files to site-packages, overwrite source code, deploy web shells, or corrupt configuration files.

The fresh Django updates also resolve XSS, cache poisoning, information disclosure, heap buffer overflow, and SQL injection vulnerabilities.

Originally published on SecurityWeek