Science & Tech · Cybersecurity · 1 hr ago

Django updates fix flaw that could let attackers run code on servers

Django updates fix flaw that could let attackers run code on servers

Django's maintainers released three security updates for the Python web framework, fixing seven vulnerabilities.

The most serious, called Django4Shell, affects GeoDjango applications that use RasterField and expose it through forms, the admin panel or writable serializers.

The flaw can let an authenticated attacker write files to a server using specially crafted raster data.

Under some conditions, those files could then be used to run code or alter application files and settings.

The issue is another incomplete fix in a series of GeoDjango flaws addressed in earlier updates.

The updates are versions 6.1.4, 6.0.11 and 5.2.20, and developers should install the version for their Django release.

The releases also fix other security issues, including cross-site scripting, SQL injection and information disclosure.

2 sources

Related

What people are saying

Mohamed K. FathyHead of cybersecurity at Robusta Technology Group
The attacker controls the target path, file content, and filename via a crafted JSON raster body
via The Hacker News
Django maintainersDjango security team
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.
via SecurityWeek
Orca SecuritySecurity company
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
via SecurityWeek