
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-1287 is a SQL injection vulnerability in Django's FilteredRelation component that allows attackers to inject malicious SQL via crafted column aliases using control characters. It affects Django versions 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28; earlier unsupported series (5.0.x, 4.1.x, 3.2.x) may also be affected. The vulnerability was disclosed on February 3, 2026, and was reported by Solomon Kebede. It carries a CVSS v3.1 base score of 5.4 (Medium) per Red Hat, though GitHub's CVSS v4 assessment rates it 8.1 (High) (Red Hat Advisory, GitHub Advisory).
The root cause is improper neutralization of special elements in SQL commands (CWE-89). The vulnerability exists in Django's FilteredRelation class, where column aliases are not properly sanitized against control characters. An attacker can craft a malicious dictionary and pass it via Python's **kwargs dictionary expansion to QuerySet methods including annotate(), aggregate(), extra(), values(), values_list(), and alias(), causing the injected control characters to break out of the intended column alias context and execute arbitrary SQL. Exploitation requires low privileges (an authenticated application user) and network access, with no user interaction needed (GitHub Advisory, Django Security Releases).
Successful exploitation can lead to unauthorized data access, data modification, or data deletion within the backend database, depending on the database user's permissions. Because the injection occurs through Django's ORM layer, any application endpoint that passes user-controlled data into the affected QuerySet methods with FilteredRelation is at risk. In worst-case scenarios with elevated database permissions, an attacker could achieve complete database compromise or potentially execute operating system commands via database-level features (GitHub Advisory, Red Hat Advisory).
As of the time of disclosure, there is no public proof-of-concept exploit and no evidence of active in-the-wild exploitation (Feedly). The EPSS score is approximately 0.013% (2nd percentile), indicating a low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No specific threat actor attribution has been reported (GitHub Advisory).
QuerySet methods using FilteredRelation.\n, carriage return \r, or null byte \x00) embedded within a column alias string intended for use with FilteredRelation.**kwargs into one of the vulnerable QuerySet methods: annotate(), aggregate(), extra(), values(), values_list(), or alias().UNION SELECT, subqueries, or conditional statements).annotate(), aggregate(), extra(), values(), values_list(), or alias() calls.%0a, %0d, %00) in fields that map to QuerySet keyword arguments.Upgrade Django to the patched versions: 6.0.2 (for 6.0.x), 5.2.11 (for 5.2.x), or 4.2.28 (for 4.2.x). Users on unsupported versions (5.0.x, 4.1.x, 3.2.x) should migrate to a supported and patched release. As an interim measure, validate and sanitize all user-controlled input before it is used in QuerySet keyword arguments, particularly when FilteredRelation is involved. Red Hat has issued errata for affected products including Ansible Automation Platform and Red Hat Satellite (Django Security Releases, Red Hat Bugzilla).
The Django security team published a blog post on February 3, 2026 announcing the security releases, and followed up on February 4, 2026 with a post on recent trends from the security team (Django Security Releases, Django Blog). Security news outlets including GBHackers, CyberSecurityNews, SecurityOnline, and CyberPress covered the vulnerability, with some framing it alongside related Django issues as "critical" SQL injection and DoS risks. The disclosure was also discussed on the oss-security mailing list and picked up by Linux distribution security advisories for Ubuntu, Debian, Fedora, SUSE, and Mageia (oss-security, Ubuntu Advisory).
Fix availability across major Linux distributions and their releases.
bookworm
python-django: 3:3.2.25-0+deb12u2
sid
python-django: 3:4.2.28-1
trixie
python-django: 3:4.2.28-0+deb13u1
bionic (esm-infra)
python-django: 1:1.11.11-1ubuntu1.21+esm14
devel
python-django: 3:5.2.9-0ubuntu3
focal (esm-infra)
python-django: 2:2.2.12-1ubuntu0.29+esm7
jammy
python-django: 2:3.2.12-2ubuntu1.25
noble
python-django: 3:4.2.11-1ubuntu1.14
questing
python-django: 3:5.2.4-1ubuntu2.3
resolute
python-django: 3:5.2.9-0ubuntu3
trusty (esm-infra-legacy)
python-django: 1.6.11-0ubuntu1.3+esm10
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."