The Library

Django CVE-2026-124827: High-Severity RasterField Flaw Could Let GDAL Write Files to an Attacker-Controlled Location, and the Fixed Versions to Install

Django fixed CVE-2026-124827, a high-severity RasterField flaw that could let GDAL write a file to an attacker-controlled location. The fixed releases are 6.1.4, 6.0.11 and 5.2.20.

Elite Performance Exclusive LLC 7 min read

Where Worldwide

Django CVE-2026-124827: High-Severity RasterField Flaw Could Let GDAL Write Files to an Attacker-Controlled Location, and the Fixed Versions to Install
On this page 8 sections

Django has fixed CVE-2026-124827, a high-severity flaw that could let an attacker make a Django server write a file to a location the attacker controls. If your website or web app runs on Django and uses a RasterField, install Django 6.1.4, 6.0.11 or 5.2.20 this week. Django's own release notes say that, depending on the raster driver, the flaw could enable remote code execution.

What happened with Django CVE-2026-124827

On Wednesday, December 2, 2026, the Django team announced security releases in a post by Jacob Walls. The post lists the issue as "CVE-2026-124827: Server-side file-write via RasterField assignment" and says: "This issue has severity "high" according to the Django security policy."

The flaw is in how Django handles raster data assigned to a RasterField. The announcement says that assigning a raster definition with a user-controlled name and a non-default driver "could cause GDAL to write a file to an attacker-controlled location."

The Django 6.1.4 release notes add the part that makes this urgent: "Depending on the raster driver, this could enable remote code execution." Put simply, a file that lands in the wrong place on a server can, in some setups, give an attacker a way to run their own code on that server.

Django credits the report in one line: "Thanks to Mohammed Fathy for the report."

What is confirmed and what is not known

Confirmed in Django's announcement and the 6.1.4 release notes:

  • The CVE id is CVE-2026-124827, titled server-side file-write via RasterField assignment.
  • Django rates it high under its own security policy.
  • The announcement lists Django 6.1 as affected.
  • The Django team released Django 6.1.4, Django 6.0.11 and Django 5.2.20.
  • Depending on the raster driver, the flaw could enable remote code execution.
  • The fix adds a GDALException safeguard, and that safeguard only limits server-side file writes. It does not cover server-side request forgery (SSRF).

Not known from these sources:

  • Whether anyone has exploited it. Neither Django page says the flaw has been used in attacks, and neither says it has not.
  • Which raster drivers make code execution possible. The release notes say it depends on the driver. We have not confirmed a list of which drivers.
  • A CVSS score. Django uses its own severity scale, and no CVSS number appears in the sources.
  • Whether Django versions other than 6.1 have this specific flaw. The announcement names Django 6.1 as affected and lists fixed releases 6.1.4, 6.0.11 and 5.2.20. The safe move is to update to the fixed release that matches whatever version you run.

Who is affected by the Django RasterField vulnerability

The risk Django describes is narrow but serious. It applies to apps that assign a raster definition to a RasterField when a user controls the name and a non-default driver is used. If your app lets customers, staff or partners submit raster data that ends up in a RasterField, treat this as urgent.

If your codebase has no RasterField at all, you are not using the code path Django describes. That is our reading of Django's description, not something Django states. It is also not a reason to skip the update: staying on the latest release of your line is the simplest habit to keep.

How to fix Django CVE-2026-124827 this week

Step What to do How to check
1. Find every Django app List websites, internal tools and APIs built on Django, including staging copies Run python -m django --version or pip show django in each environment
2. Update Update to Django 6.1.4, 6.0.11 or 5.2.20 Run the version check again after you deploy
3. Search for RasterField Find every model and form that uses it Search the codebase for RasterField
4. Review user input Flag every place where a user can set the raster name or driver Follow raster data from the request to the field
5. Handle non-default drivers If you need another driver, wrap the trusted definition in GDALRaster Confirm that only values you control are wrapped
6. Validate untrusted input Follow Django's raster security considerations and validate input before accepting it Test unexpected names and drivers in staging
7. Plan beyond the patch The new safeguard does not cover SSRF, so keep validating raster input Check that validation is in place for every raster input

What changes after the update: GDALRaster and non-default drivers

The 6.1.4 release notes describe the new safeguard, which is built around GDALException. For teams that really do need a driver other than the default, Django's advice is direct: "To use other drivers, wrap the definition in GDALRaster to signify the value is trusted."

If your app relies on a non-default driver, test it in staging after you update. Django now expects you to mark trusted definitions by wrapping them in GDALRaster.

That leads to two cautions. First, wrapping a value in GDALRaster tells Django you trust it, so only wrap data your own code produced or fully checked. Wrapping user input just to get past the new check would undo the protection. Second, the release notes are explicit about the limit: "This exception only limits server-side file writes." The same notes tell developers: "See raster security considerations and implement validation before accepting untrusted input." The update is the minimum, not the end of the job.

Why this matters for a business website or app

A Django app might run a customer portal, a booking system, an online store or an internal dashboard. If an outsider can place files on that server, and in some setups run code, then everything the server can reach is at risk: the database, stored API keys, and the accounts the app uses to send email or take payments. Even without code execution, no business wants an attacker choosing where files land on a public web server.

The harder problem is usually not the patch. It is knowing which apps exist and who is responsible for updating them. A Django app a contractor built years ago can sit on an old release line long after anyone remembers it. We wrote about that gap in Who Is Patching the Software That Runs Your Business?, and about why a version bump does not finish the job in Updated Is Not the Same as Patched.

Django CVE-2026-124827 questions people are asking

What is CVE-2026-124827?

CVE-2026-124827 is a high-severity Django flaw in RasterField assignment. If a raster definition has a user-controlled name and a non-default driver, GDAL could write a file to a location the attacker controls.

Which Django versions fix CVE-2026-124827?

Django 6.1.4, Django 6.0.11 and Django 5.2.20, announced on December 2, 2026.

Can CVE-2026-124827 lead to remote code execution?

In some setups, yes. Django's 6.1.4 release notes say that, depending on the raster driver, it could enable remote code execution.

Is CVE-2026-124827 being exploited?

Not known. Django's announcement and release notes do not say whether it has been used in attacks.

Does the Django update stop SSRF?

No. The release notes say the new safeguard only limits server-side file writes. You still need to validate untrusted raster input.

Do I need to update if I don't use RasterField?

The flaw Django describes involves RasterField assignment, but updating to the latest release of your line is still the right call.

Who found the Django RasterField flaw?

Django credits Mohammed Fathy with the report.

The bigger lesson

Frameworks like Django do a lot of the heavy lifting in business software. When a framework ships a security release, the work moves to whoever runs the app. The fix here is a version number, but the full answer is knowing where your apps are and which features they use, and treating anything a user sends as untrusted until your code has checked it.

Need help finding and hardening your Django apps? See security hardening or get a quote.

Get security alerts like this by email, along with our free checklist, at our security alerts page.

Sources: Django security releases, December 2, 2026; Django 6.1.4 release notes.

Share X LinkedIn Facebook

Was this article helpful?

We only keep the note with this article. No name, no email.

Protected by reCAPTCHA - Privacy and Terms.

Have a question about this article?

Ask it here and we will answer you directly by email. Questions are private, never posted.

Protected by reCAPTCHA - Privacy and Terms.

Security alerts by email

Hear about the next one first.

When attackers start using a flaw in software businesses run on, we email what it is, whether it touches you and what to do that week, with a round-up of our latest security writing. Free, one-click unsubscribe. You get the checklist straight away: 12 things to secure this week.

Protected by reCAPTCHA - Privacy and Terms.

Want a result like this?

Security alerts, breaches and the technology a business runs on: what happened, who it affects and what to do.

Get a Tech Quote

Security alerts by email

The next security hole is already out there. Hear about it from us first.

When attackers start using a flaw in software businesses run on, we email what it is, whether it touches you and what to do that week, with a round-up of our latest security writing. Free, one-click unsubscribe. You get the checklist straight away: 12 things to secure this week.

Protected by reCAPTCHA - Privacy and Terms.