The seven Django security flaws were fixed by the framework team in three patch releases for the 6.1, 6.0 and 5.2 branches, including a high-severity flaw that allows files to be written to the server and could lead to remote code execution. The team urged all users to update immediately.
Read also: Two HPE Flaws Grant Network Administrator Privileges
The dangerous file-write flaw
The most serious flaw concerns the raster field in the framework's geographic module. Attacker-controlled input can make the geospatial processing library write a file to a path of the attacker's choosing. The project says the flaw by default reaches models registered in the admin panel or writable forms and serializers. The researcher who found it called it Django Four Shell because it is an incomplete fix for two earlier flaws. A technical report gave it a score of 9.0, while the project rated it high severity. The researcher says an attacker could replace application code or plant a backdoor in the static files folder.
Query injection and cross-site scripting
The team rated a second flaw high severity: query language injection in range and list lookups when percent signs appear in aliased column names or key transforms. It also fixed a medium-severity cross-site scripting flaw in the rich text truncation filter, and the range lookup now requires exactly two values.
Four low-severity flaws
The remaining four flaws are low severity: cache poisoning through dot segments in request paths, data leakage from the admin change list through the primary key shortcut, a similar leak through reverse relations reported by researchers including OpenAI, and a memory overflow in the feature that reads geometries larger than 4 GB.
Read also: Linux Flaw Grants Root Access Through a USB Stick
The fix changed the behaviour of the field itself. It is now non-editable by default and excluded from forms unless explicitly included. It now raises an exception when a definition with a non-default operator is assigned, and anyone who wants other operators must wrap the definition in a trusted object. The risk of server-side request forgery remains if untrusted input arrives.
The project stresses that the field concerned works only with a PostGIS database and that ordinary geometries were not affected. The affected releases include the main branch and the 6.1, 6.0 and 5.2 branches. Government cybersecurity bodies issued alerts urging an update, and clearing the cache after upgrading is advised because previously stored responses are not invalidated automatically.
Comments (0)
No comments have been published yet.
Add a comment