MEDIUM 4.8

CVE-2026-53877: Django GIS GDALRaster Buffer Over-Read Vulnerability

Django's GIS (Geographic Information System) module contains a buffer over-read vulnerability when processing binary geographic data. An attacker could craft malicious geographic data that, when parsed by a Django application, either exposes sensitive information from the server's memory or crashes the application. The vulnerability affects Django 6.0 before version 6.0.7 and 5.2 before version 5.2.16, with earlier unsupported versions potentially vulnerable as well.

Source data · NVD / CISA · public domain

CVSS
3.1 · 4.8 MEDIUM · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L
Weaknesses (CWE)
CWE-805
Affected products
1 configuration(s)
Published / Modified
2026-07-07 / 2026-07-09

NVD description (verbatim)

An issue was discovered in Django 6.0 before 6.0.7 and 5.2 before 5.2.16. `django.contrib.gis.gdal.GDALRaster` over-reads its in-memory buffer when constructed from a bytes object, which can disclose adjacent memory or cause service degradation via a potential segmentation fault when the `vsi_buffer` property is accessed. Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected. Django would like to thank Bence Nagy for reporting this issue.

3 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability exists in `django.contrib.gis.gdal.GDALRaster`, which incorrectly handles the buffer boundaries when instantiating GDALRaster objects from bytes input. The flaw is a CWE-805 buffer over-read that occurs when the `vsi_buffer` property is subsequently accessed on the malformed object. This can result in reading memory beyond the allocated buffer, potentially exposing adjacent memory contents, or triggering a segmentation fault that denies service. The issue requires network access but does not require authentication or user interaction to trigger.

Business impact

Organizations running Django applications with GIS functionality should assess exposure. A successful exploit could result in information disclosure (leaking sensitive data from server memory) or availability loss (application crash). The impact is most significant for web applications handling geographic data processing, mapping services, or location-based features. While the CVSS score is moderate, the combination of remote exploitability and memory disclosure potential warrants timely remediation, particularly if the affected Django instance processes untrusted geographic input.

Affected systems

Django 6.0.0 through 6.0.6 and Django 5.2.0 through 5.2.15 are confirmed affected. Django versions 5.0.x, 4.1.x, and 3.2.x (all unsupported) have not been formally evaluated but may be vulnerable. Any Django application using the `django.contrib.gis` module with GDALRaster construction from external bytes data is at risk.

Exploitability

The vulnerability requires network access but no credentials or user interaction. However, practical exploitation depends on the application's architecture: the attacker must influence the bytes input passed to GDALRaster construction. This is achievable in applications that accept geographic file uploads, process geographic data from APIs, or construct raster objects from untrusted sources. The CVSS vector (AC:H) reflects the somewhat elevated complexity of reliably triggering memory disclosure versus a guaranteed denial-of-service condition.

Remediation

Upgrade to Django 6.0.7 or later for the 6.0 series, and Django 5.2.16 or later for the 5.2 series. Organizations on unsupported versions (5.0.x, 4.1.x, 3.2.x) should prioritize migration to a supported release. As an interim control, restrict the sources of geographic data accepted by your application and validate file formats before passing them to GDALRaster.

Patch guidance

Django recommends upgrading to 6.0.7 (or newer in the 6.0.x line) or 5.2.16 (or newer in the 5.2.x line). Verify the exact patch version in the official Django security advisory before deployment. Test patched versions in a staging environment, particularly if your application heavily uses GIS functionality, to ensure no regressions in geographic data processing workflows. Organizations unable to upgrade immediately should implement network-level controls to restrict access to endpoints processing geographic data.

Detection guidance

Monitor application logs for exceptions or crashes when processing geographic data, particularly segmentation faults or unhandled exceptions within django.contrib.gis modules. If you have request logging, flag unusual geographic file uploads or requests with unexpected binary content. Review application code to identify all locations where GDALRaster is instantiated, especially those accepting external input. Intrusion detection systems should be configured to alert on suspicious patterns of geographic data submission followed by application errors.

Why prioritize this

Although the CVSS score is moderate (4.8), this vulnerability merits prompt attention because it combines remote exploitability with dual impact (information disclosure and denial of service). Organizations using Django GIS should prioritize this update within their standard patch cycle. The memory disclosure aspect is particularly concerning for applications handling sensitive geospatial data or running in regulated environments. Unsupported version users should accelerate their upgrade timeline.

Risk score, explained

The CVSS 3.1 score of 4.8 (MEDIUM) reflects a network-exploitable vulnerability with no authentication required, but elevated attack complexity (AC:H) due to the need for precise malformed input. The impact is limited scope with low confidentiality impact (memory disclosure) and low availability impact (potential crash). The moderate score should not obscure the real-world risk: information disclosure from memory is a serious concern, and the need for specialized input makes the attack less trivial but still feasible for motivated attackers.

Frequently asked questions

Does this vulnerability affect my Django application if we don't use the GIS module?

No. If your Django project does not import or use `django.contrib.gis`, you are not affected by this vulnerability. Check your `INSTALLED_APPS` setting and project dependencies to confirm GIS is not in use.

Can this be exploited without the attacker sending data to the vulnerable endpoint?

No. The attacker must supply malicious bytes data that gets processed by GDALRaster. This typically requires network access to an endpoint accepting geographic data input. Internal tools not exposed to the internet face lower risk.

What is the difference between the information disclosure and denial-of-service impacts?

Information disclosure occurs when the over-read accesses valid memory containing sensitive data, leaking it to the attacker. Denial of service occurs if the malformed input triggers a segmentation fault, crashing the application. Both are possible depending on the payload and server state.

Should we patch immediately, or can we wait for the next release cycle?

We recommend patching within 2-4 weeks if you use GIS functionality. The CVSS score is moderate, but remote exploitability and memory disclosure potential justify expedited handling. If geographic data processing is a core function, prioritize sooner. Organizations on unsupported versions should migrate to a supported release as a higher priority.

This analysis is based on the official CVE record and Django security advisory as of the publication date. Vulnerability details, affected versions, and patch information are subject to change. Organizations should verify patch availability and compatibility in their specific environments before deployment. This document does not constitute security advice; consult with your security team and vendor guidance for definitive remediation decisions. No exploit code or detailed attack steps are provided; responsible disclosure practices are observed. Source: NVD (public-domain), retrieved 2026-08-16. Analysis generated by SEC.co (claude-haiku-4-5).