CVE-2026-1287: SQL injection in Django FilteredRelation column aliases
- Vendor
- Djangoproject
CVE-2026-1287 is a SQL injection vulnerability in Django's FilteredRelation column-alias handling. Control characters in a suitably crafted dictionary can inject SQL when the dictionary is expanded as **kwargs into the QuerySet methods annotate(), aggregate(), extra(), values(), values_list(), or alias(). Affected releases are Django 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28. Earlier unsupported series, including 5.0.x, 4.1.x, and 3.2.x, were not evaluated and may also be affected.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows SQL injection through crafted column aliases, potentially enabling unauthorized database query manipulation, data disclosure, or data modification. The specific database-level consequences depend on the application's query construction and database backend behavior.
Mitigation
If you can’t patch tonight, do this now.
Until patching, avoid expanding untrusted or user-controlled dictionaries as **kwargs into affected QuerySet methods that reach FilteredRelation alias handling. Validate alias inputs to reject control characters. Restrict access to affected application endpoints and monitor for anomalous SQL injection attempts. These measures do not replace installing a fixed release.
Remediation
Patch, then assume compromise.
Upgrade to Django 6.0.2 or later in the 6.0 series, 5.2.11 or later in the 5.2 series, or 4.2.28 or later in the 4.2 series. Migrate unsupported upstream branches to a supported, patched release or apply the relevant distribution-maintained security update. Debian fixes are available in python-django 3:3.2.25-0+deb12u2 for bookworm and 3:4.2.28-0+deb13u1 for trixie. For bundled deployments, apply the applicable Red Hat updates: RHSA-2026:3958 or RHSA-2026:3959 for Ansible Automation Platform, and RHSA-2026:5970 or RHSA-2026:5971 for Satellite.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2026-1287 exploited in the wild?
- As of Oct 3, 2026, Mallory has no reports of CVE-2026-1287 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-1287?
- As of Oct 3, 2026, Mallory has found no public exploit for CVE-2026-1287.
- Is there a patch for CVE-2026-1287?
- Upgrade to Django 6.0.2 or later in the 6.0 series, 5.2.11 or later in the 5.2 series, or 4.2.28 or later in the 4.2 series. Migrate unsupported upstream branches to a supported, patched release or apply the relevant distribution-maintained security update.
- What products are affected by CVE-2026-1287?
- Djangoproject Django.
- How severe is CVE-2026-1287?
- CVE-2026-1287 has a CVSS v3.1 score of 8.3 (High) and an EPSS score of 0.84% (59th percentile) as of Oct 3, 2026.
Recent activity
16 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.