CVE-2026-87890 in Django
Summary
by MITRE • 10/06/2026
An issue was discovered in Django 6.1 before 6.1.2, 6.0 before 6.0.9, and 5.2 before 5.2.18. An incomplete fix for CVE-2026-15307 in Django spatial lookups allows an attacker who can supply `bytes` values to cause the Django process to make network requests via a crafted VRT document referencing an external raster source. 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 sicksec for reporting this issue.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 10/06/2026
The vulnerability identified in Django versions prior to 6.1.2, 6.0.9, and 5.2.18 represents a critical security flaw rooted in the framework's handling of spatial lookups involving GeoDjango components. This issue is classified as an incomplete fix for CVE-2026-15307, indicating that previous remediation efforts failed to fully address the underlying mechanism allowing malicious input exploitation. The core technical flaw lies in how Django processes VRT (Virtual Raster Tile) documents when they are supplied via spatial query parameters. Specifically, if an attacker can inject or supply bytes values into these lookups, the application may inadvertently parse a crafted VRT document that references external raster sources. This behavior triggers server-side request forgery characteristics where the Django process itself initiates network connections to arbitrary destinations defined within the malicious payload rather than relying on user-supplied URLs directly in standard HTTP requests.
From an operational perspective, this vulnerability allows for significant impact beyond simple data exposure or denial of service. By forcing the application server to make outbound network requests, attackers can leverage the internal network position and trust relationships of the Django host. This capability facilitates several attack vectors including SSRF-based reconnaissance of internal services, exfiltration of sensitive data from backend systems that are not directly exposed to the internet, and potential pivoting into more secure network segments. The use of VRT documents as a vector is particularly insidious because it exploits legitimate geospatial functionality often used in mapping applications or location-based services, making detection through standard web application firewalls difficult unless specific patterns related to raster source definitions are monitored.
The technical classification of this vulnerability aligns with CWE-918 Server-Side Request Forgery (SSRF), specifically focusing on the abuse of server-side libraries that process external resources. Additionally, it relates to CWE-20 Improper Input Validation, as the framework failed to adequately sanitize or restrict the types of data structures and file formats accepted during spatial lookup operations. In terms of MITRE ATT&CK mapping, this behavior corresponds to T1583 Acquire Infrastructure: Domains and T1598 Phishing for Information, although in a direct exploitation context it is more accurately mapped to T1071 Application Layer Protocol abuse or potentially T1046 Network Service Discovery if used for scanning internal networks. The fact that earlier unsupported versions like 5.1.x, 5.0.x, and 4.2.x were not evaluated suggests a broader risk landscape where legacy systems may remain vulnerable to similar exploitation techniques due to lack of patching or security updates from the Django project maintainers.
Mitigation strategies must prioritize immediate upgrading to the patched versions mentioned above for all supported branches. For organizations unable to upgrade immediately, compensating controls should include strict input validation on any fields that accept spatial data or file uploads related to geospatial processing. Implementing network-level egress filtering is crucial; Django application servers should be restricted from making outbound connections except to explicitly whitelisted domains and ports. This limits the utility of SSRF attacks even if exploitation occurs. Furthermore, deploying a Web Application Firewall with rules specifically targeting VRT file structures or known malicious raster source patterns can provide an additional layer of defense. Security teams should also audit existing codebases for any custom spatial lookup implementations that might bypass Django's built-in protections and ensure that all third-party geospatial libraries are updated to their latest secure versions.