Jones Web Designs & Development is now The Jones Foundry. What it means for clients

Django4Shell vulnerability: patch Django to stop file-write RCE

Django's maintainers shipped fixes for seven bugs, including a high-severity flaw with public proof-of-concept details. Here is who should worry and what to do.

Django's maintainers have released new security updates that fix a high-severity flaw nicknamed Django4Shell. According to SecurityWeek, the Django4Shell vulnerability can lead to remote code execution (RCE), meaning an attacker could end up running their own code on your server. Public proof-of-concept details already exist, so anyone running an affected app should treat the update as a priority.

What the Django4Shell vulnerability does

Django is a free, open source web framework built on Python. Developers use it to build websites and web applications, so it often sits quietly behind a customer portal, an internal tool, or a custom database app that a small team depends on.

On Wednesday, the maintainers released Django versions 6.1.4, 6.0.11, and 5.2.20 to fix seven security bugs. The most serious is CVE-2026-124827, which scores 8.8 on the CVSS severity scale. SecurityWeek reports that the problem sits in GeoDjango's RasterField component, which handles map and image-style raster data. The software does not check user-supplied raster data carefully enough, so an authenticated attacker can write arbitrary files to the server.

Writing files sounds less dramatic than taking over a server, but it can be the same thing in practice. The report says an attacker could write to any accessible path on the system, which could open several routes to remote code execution.

Who is actually at risk

The exposure is narrower than "every Django site." SecurityWeek says any GeoDjango application running on PostGIS that defines a RasterField may be vulnerable. The risk is highest when that field is exposed through the Django admin, ModelForms, or writable model serializers.

The maintainers explain that RasterField falls back to the CharField form field. In their words, that made the flaw reachable by default on models with RasterField registered in those places. In plain terms, a developer did not have to do anything unusual to be exposed.

The attacker must be authenticated, so they need a login of some kind. If only a few trusted staff can reach those forms, the pool of possible attackers is small. If your app lets customers, volunteers, or other outside users submit data through forms or an API tied to that field, the pool is larger. Your developer will know which describes your setup.

Orca Security, quoted by SecurityWeek, describes how an attack could work: a crafted JSON raster body with a user-controlled name parameter and a non-default GDAL driver. From there, an attacker could:

  • Drop Python files into the working directory
  • Write files into site-packages
  • Overwrite source code
  • Deploy web shells
  • Corrupt configuration files

A web shell is a small hidden program that gives an attacker ongoing remote control, which is why file-write bugs deserve quick attention.

A third try at the same weakness

This flaw has a history. SecurityWeek reports it is an incomplete fix for CVE-2026-87890, a server-side request forgery bug patched in October. That one was itself an incomplete fix for CVE-2026-15307, a server-side file-write and request forgery bug patched in August.

Orca Security says the earlier protections did not cover the RasterField assignment path, calling it a "persistent and recurring attack surface" that the Django team has now addressed more thoroughly. The lesson for site owners is simple: if your team patched in August or October and moved on, that was not enough for this component. Confirm you are on the latest release for your Django line.

The other six fixes

The same releases also resolve vulnerabilities involving cross-site scripting (XSS), cache poisoning, information disclosure, a heap buffer overflow, and SQL injection. SecurityWeek does not give details on those here, and they may not apply to your app. That is one more reason to take the full update rather than waiting to see whether you use GeoDjango.

What to do this week

If you do not write code yourself, start with a question to whoever builds or hosts your site. These steps follow from the facts above:

  • Find out whether you run Django. Ask your developer or agency. If the answer is no, this story does not affect you.
  • Check for GeoDjango and RasterField. Ask whether the app uses GeoDjango on PostGIS and defines a RasterField, and whether it is reachable through the admin, forms, or APIs.
  • Update Django. Move to 6.1.4, 6.0.11, or 5.2.20, depending on your release line. Test first if you can, but do not let it sit.
  • Look for signs of tampering. Since the attack can write files, have someone check for unexpected Python files, changes to installed packages or source code, unfamiliar web shells, and altered configuration files.
  • Review who has accounts. The flaw needs an authenticated user, so remove old or unused accounts and make sure admin access is limited to people who need it.
  • Turn on multi-factor authentication for admin logins where your setup supports it.

If you are not sure how exposed your own site is, start with a free external scan to see what an outsider can see.

The bottom line

Django4Shell is not a reason to panic, and it does not touch every Django site. It is, however, a serious bug with public exploit details, and it is the third patch for the same underlying weakness. Confirm whether you are in the affected group, update, and check the server for anything that should not be there.

Sources

This post was drafted with AI from the reporting linked above and published by The Jones Foundry. For full details, read the original sources.

Found this useful? Pass it on to someone who would want to know.

All Online Security posts →