Django Security Alert: 7 Vulnerabilities Patched in Early December 2026
Django's early December 2026 security update fixes seven vulnerabilities, including potential remote code execution through GeoDjango RasterField and SQL injection in specific ORM lookups. Explore the affected versions, security implications, and practical steps to patch production applications.
Django has released security updates addressing seven vulnerabilities across its supported release branches. Published on December 2, 2026, the update fixes two high-severity vulnerabilities, one moderate-severity issue, and four low-severity issues.
The most significant findings include a server-side file-writing vulnerability in GeoDjango's RasterField that could potentially lead to remote code execution (RCE), and a SQL injection vulnerability affecting specific Django ORM lookup operations.
The Django Software Foundation has released patched versions for Django 6.1, 6.0, and 5.2 LTS. Developers, system administrators, and DevOps teams maintaining Django applications should identify affected deployments and apply the appropriate updates.
Not every vulnerability affects every Django application. However, the combination of potential remote code execution, SQL injection, cross-site scripting, and caching issues makes this release important for production environments.
This guide examines the seven vulnerabilities, explains their potential impact, identifies the patched versions, and provides practical steps to secure existing Django deployments.

Django's Early December 2026 Security Update
The December 2 announcement covers seven security vulnerabilities affecting Django's supported release branches.
Here is a summary of the release:
| Detail | Information |
|---|---|
| Release date | December 2, 2026 |
| Security issues | 7 |
| High severity | 2 |
| Moderate severity | 1 |
| Low severity | 4 |
| Main concerns | Potential RCE, SQL injection, XSS, cache poisoning, information disclosure |
| Affected branches | Django 6.1, 6.0, 5.2 |
| Patched releases | 6.1.4, 6.0.11, 5.2.20 |
Django recommends that users upgrade to the corresponding security releases as soon as possible.
Official announcement: Django Security Releases – December 2, 2026.
The Two High-Severity Vulnerabilities
Two vulnerabilities received a high-severity classification under Django's security policy. Both affect different areas of the framework and require attention from developers maintaining applications that use the affected functionality.
1. CVE-2026-124827: Potential Remote Code Execution Through RasterField
The first vulnerability affects GeoDjango's RasterField:
django.contrib.gis.db.models.RasterField
The issue involves assigning a raster data definition containing a user-controlled name parameter and a non-default GDAL driver.
Under these conditions, GDAL could write files to attacker-controlled locations. Depending on the raster driver, this behavior could potentially lead to remote code execution.
The vulnerability is particularly relevant to applications that expose raster fields through:
- Django Admin interfaces.
ModelForminstances.- Writable model serializers.
The underlying problem is how Django handled raster definitions and how GDAL processes different raster drivers.

Why does this matter?
Server-side file writing can become a serious security issue when an attacker can influence where an application writes data.
Depending on filesystem permissions and the available drivers, an attacker could potentially overwrite sensitive files or place files in locations where other processes might execute or load them.
This does not mean every application using Django or PostGIS is automatically vulnerable. Exploitation depends on the application's configuration and whether an attacker can reach the affected input-handling functionality.
How Django addressed it
The security update introduces two important changes:
RasterFieldnow defaults toeditable=False, preventing it from being included in aModelFormunless explicitly enabled.- Assigning a dictionary or JSON string specifying a non-default GDAL driver now raises
GDALException.
Applications that require other raster drivers can use GDALRaster to explicitly provide trusted raster definitions.
One important limitation remains: Django warns that server-side request forgery (SSRF) can still be possible if untrusted input is assigned to RasterField. Applications must validate untrusted input rather than relying exclusively on the framework's patch.
Ordinary geometry fields are not affected. RasterField is implemented for PostGIS.
Reference: Django – CVE-2026-124827.
2. CVE-2026-132092: SQL Injection in Django ORM Lookups
The second high-severity vulnerability involves SQL injection in Django ORM's range and in lookups.
Django ORM normally handles SQL query construction and parameterization, reducing the need for developers to construct SQL statements manually. However, this vulnerability demonstrates that framework-level query handling can still contain security-sensitive edge cases.
The issue affects queries involving aliases or key transforms containing percent (%) signs.
The vulnerable conditions are specific:
- The
__rangeissue required incorrectly supplying more than two right-hand-side values. - The
__inissue required a bilateral transform. - Both involved aliases or key transforms containing percent signs.
This does not mean ordinary Django ORM queries using filter(), range, or in are universally vulnerable.
What changed?
Django corrected the affected lookup handling. The range lookup now requires exactly two right-hand-side values.
Django also notes that using percent signs in column aliases and key transforms was deprecated in Django 6.0 and is scheduled for removal in Django 2028.
Developers using custom ORM expressions, bilateral transforms, or unusual query aliases should review their implementations and upgrade to the patched release.
Reference: Django – CVE-2026-132092.
The Other Five Security Vulnerabilities
The remaining five issues affect HTML rendering, caching, Django Admin, and GeoDjango's GDAL integration.
| CVE | Vulnerability | Severity |
|---|---|---|
| CVE-2026-115868 | Potential XSS in truncatechars_html |
Moderate |
| CVE-2026-125673 | Cache poisoning through dot segments in request paths | Low |
| CVE-2026-119642 | Admin information leakage involving OneToOneField primary-key aliases |
Low |
| CVE-2026-127929 | Admin information leakage through reverse relations | Low |
| CVE-2026-132809 | Heap buffer overflow in OGRGeometry.wkb |
Low |
XSS in truncatechars_html
CVE-2026-115868 affects Django's truncatechars_html template filter and Truncator.chars() when used with html=True.
Certain inputs whose text length matches the truncation limit could produce unsafe HTML when rendered inside an HTML attribute, potentially creating an XSS vulnerability.
Applications using these features to process and render untrusted content should upgrade and review their HTML rendering behavior.
Cache Poisoning Through Request Paths
CVE-2026-125673 affects Django's UpdateCacheMiddleware and cache_page() decorator.
The problem involved incorrect normalization of request paths containing . or .. segments in HttpRequest.build_absolute_uri().
Under certain deployment and URL configurations, an unauthenticated attacker could potentially cause cached responses to be served for unintended URLs.
Django corrected the path-handling behavior.
Important: Existing cached responses are not automatically invalidated by the patch. Administrators should clear potentially affected caches after upgrading.
Information Leakage in Django Admin
CVE-2026-119642 and CVE-2026-127929 involve information leakage through Django Admin changelists.
The first affects models using custom OneToOneField primary keys and manipulated pk aliases in query strings.
The second involves reverse relations and repeated lookup searches through manipulated query strings.
Both issues require authenticated staff users with relevant view permissions and sufficient knowledge of the underlying model relationships.
They should not be interpreted as vulnerabilities providing unauthenticated access to Django Admin.
GDAL Heap Buffer Overflow
CVE-2026-132809 affects OGRGeometry.wkb when processing geometries larger than 4 GB on 64-bit platforms.
The affected properties also include hex and geos, along with geometry pickling.
An undersized buffer could result in segmentation faults or undefined behavior.
Although the conditions are relatively specific, applications processing large geospatial datasets should install the patched release.
Which Django Versions Should Be Updated?
The December security fixes have been applied to the supported Django 6.1, 6.0, and 5.2 branches.
| Release branch | Patched version |
|---|---|
| Django 6.1 | 6.1.4 |
| Django 6.0 | 6.0.11 |
| Django 5.2 LTS | 5.2.20 |
Administrators should upgrade to the corresponding patched version or a newer compatible security release.
If your application runs an older, unsupported Django branch, do not assume these updates protect it. Review Django's security support policy and plan an upgrade to a supported release.
Reference: Django Security Release Policy.
How to Check and Upgrade Your Django Installation

Before updating production, identify the Django version installed in the environment actually used by your application.
Step 1: Check the Installed Version
Activate your application's virtual environment:
cd /var/www/my-django-app
source venv/bin/activate
Check the Django version:
python -m django --version
Alternatively:
python -m pip show Django
If you maintain multiple Django applications, check each virtual environment separately. The system-wide Python installation might not be the environment used by your production application.
Step 2: Install the Corresponding Security Update
Choose the command matching your existing release branch:
Django 6.1:
python -m pip install "Django==6.1.4"
Django 6.0:
python -m pip install "Django==6.0.11"
Django 5.2 LTS:
python -m pip install "Django==5.2.20"
If your project uses Poetry, Pipenv, or a requirements lockfile, update the dependency through the project's normal dependency-management workflow.
Avoid changing the release branch simply to apply a security patch without first checking application compatibility.
Step 3: Verify the Update
After installation, verify the version:
python -m django --version
For a Django 5.2 application, the expected output is:
5.2.20
You can also check installed dependencies:
python -m pip check
This helps identify dependency conflicts introduced during the update.
Step 4: Restart and Verify Production Services
A successful package installation does not guarantee that running application processes have loaded the updated framework.
Restart the relevant application services, including Gunicorn, uWSGI, Daphne, or background workers where applicable.
For example:
sudo systemctl restart gunicorn
For containerized applications, rebuild and deploy the updated image using your normal deployment process.
Step 5: Review Caching and GeoDjango Configurations
If your application uses Django's caching middleware or cache_page(), clear potentially affected cached responses after upgrading.
For GeoDjango applications, review RasterField usage, writable forms, serializers, GDAL driver handling, and filesystem permissions.
Avoid granting application processes unnecessary write access to system directories or application code.
For additional guidance, see our Linux File Permissions, Users & Groups guide.
Finally, run your application tests and verify important database queries, forms, administrative functions, and background jobs.
Final Recommendations
Django's early December 2026 security update addresses seven vulnerabilities across important framework components. The two high-severity issues involving GeoDjango's RasterField and Django ORM lookups deserve particular attention, but the remaining fixes are also relevant to applications using HTML truncation, caching, Django Admin, and GDAL.
For administrators and development teams, the recommended actions are straightforward:
- Identify every Django application and its installed version.
- Confirm whether each application runs a supported release branch.
- Upgrade to the corresponding patched version.
- Review GeoDjango, custom ORM queries, caching, and admin configurations where applicable.
- Restart application processes and rebuild deployment images.
- Verify the installed version and run application tests.
Security maintenance should be part of routine application operations rather than something addressed only after an incident.
This advisory reflects the Django security announcement published on December 2, 2026. As December progresses, administrators should continue monitoring the official Django security announcements for additional releases and updates.
Official reference: Django Security Releases – December 2, 2026.