Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
9.4
CVE-2026-124827: Django RasterField may let attackers create files
CVE-2026-124827 · published 3 days ago
Summary
The Django web framework’s RasterField feature can be tricked into writing files to locations chosen by an attacker. If the written files are later run, it could let the attacker run their own code on the server. Upgrade Django to the latest release or apply the vendor‑provided patches to stop the problem.
What to do
- Update py3-django to version 5.2.20-r0.
- Update djangoproject django to version 6.1.4 or later.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| Debian:12 | debian | python-django | All versions |
| – | djangoproject | django | < 6.1.4 |
| Ubuntu:Pro:14.04:LTS | canonical | python-django | All versions |
| Alpine:v3.25 | – | py3-django |
< 5.2.20-r0 Fix: upgrade to 5.2.20-r0
|
Original advisory text
Server-side file-write via RasterField assignment
An issue was discovered in Django 6.1 before 6.1.4, 6.0 before 6.0.11, and 5.2 before 5.2.20.
`django.contrib.gis.db.models.RasterField` allows the creation of files at attacker-controlled locations via the `name` parameter of a data definition. Depending on the raster driver, this could enable remote code execution.
Earlier, unsupported Django series (such as 5.1.x, 5.0.x, and 4.2.x) were not evaluated and may also be affected.
Django would like to thank Mohammed Fathy for reporting this issue.
`django.contrib.gis.db.models.RasterField` allows the creation of files at attacker-controlled locations via the `name` parameter of a data definition. Depending on the raster driver, this could enable remote code execution.
Earlier, unsupported Django series (such as 5.1.x, 5.0.x, and 4.2.x) were not evaluated and may also be affected.
Django would like to thank Mohammed Fathy for reporting this issue.
References
- https://docs.djangoproject.com/en/dev/releases/security/ Vendor Advisory
- https://github.com/django/django/commit/02d09443c441ffc8064206dc4a8bdc6496fa49b0 Third Party Advisory
- https://github.com/django/django/commit/6b5d29eae050ac7cf72cc5a407d2094ad8e83789 Patch
- https://github.com/django/django/commit/a3934abd4c0d43430efec34d6ae933794df2c2f5 Patch
- https://github.com/django/django/commit/b70d098878ae1a65fa2377be776610500ff44336 Patch
- https://groups.google.com/g/django-announce Third Party Advisory
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/124xxx/CVE-2026-1248... Vendor Advisory
- https://www.djangoproject.com/weblog/2026/dec/02/security-releases/ Third Party Advisory
- https://security-tracker.debian.org/tracker/CVE-2026-124827 Vendor Advisory
- https://github.com/django/django/ URL
- https://nvd.nist.gov/vuln/detail/CVE-2026-124827 Vendor Advisory
- https://pypi.org/project/Django/ Product
- https://ubuntu.com/security/CVE-2026-124827 Third Party Advisory
- https://www.cve.org/CVERecord?id=CVE-2026-124827 Third Party Advisory
- https://security.alpinelinux.org/vuln/CVE-2026-124827 Vendor Advisory
Internet-facing
14 days
Internal
At next upgrade
- Not known to be exploited
- Needs hands-on effort to exploit
- Gives an attacker full control
Severity
9.4
Critical
Type
CWE-73External Control of File Name or Path
Timeline
Published2 Dec 2026
Updated4 Dec 2026
First seen2 Dec 2026
Sources
CVE-2026-124827 · NVD
CVE-2026-124827 · OSV
DEBIAN-CVE-2026-124827 · OSV
CVE-2026-124827 · MITRE
UBUNTU-CVE-2026-124827 · OSV
ALPINE-CVE-2026-124827 · OSV
Track software like this
Free during beta