Vulnerability · Published Feb 3, 2026 · Assigned by DSF

CVE-2026-1287Potential SQL injection in column aliases via control characters

Medium 5.4

In plain English

A medium-severity SQL injection in Django from djangoproject. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 58% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.4Medium
Exploit odds (30 days)0.8%top 41.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

An issue was discovered in 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28. `FilteredRelation` is subject to SQL injection in column aliases via control characters, using a suitably crafted dictionary, with dictionary expansion, as the `**kwargs` passed to `QuerySet` methods `annotate()`, `aggregate()`, `extra()`, `values()`, `values_list()`, and `alias()`. 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 Solomon Kebede for reporting this issue.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.23py3-django4.2.28-r0ALPINE-CVE-2026-1287
Alpine:v3.24py3-django4.2.28-r0ALPINE-CVE-2026-1287
Debian:12python-django3:3.2.25-0+deb12u2DEBIAN-CVE-2026-1287
Debian:12python-django3:3.2.25-0+deb12u2DSA-6150-1
Debian:13python-django3:4.2.28-0+deb13u1DEBIAN-CVE-2026-1287
Debian:13python-django3:4.2.28-0+deb13u1DSA-6150-1
Debian:14python-django3:4.2.28-1DEBIAN-CVE-2026-1287
PyPIdjango5.2.11GHSA-gvg8-93h5-g6qq
PyPIdjango6.0.2GHSA-gvg8-93h5-g6qq
PyPIdjango4.2.28GHSA-gvg8-93h5-g6qq
PyPIdjango4.2.28, 5.2.11, 6.0.2PYSEC-2026-46
Ubuntu:22.04:LTSpython-django2:3.2.12-2ubuntu1.25UBUNTU-CVE-2026-1287
Ubuntu:24.04:LTSpython-django3:4.2.11-1ubuntu1.14UBUNTU-CVE-2026-1287
Ubuntu:25.10python-django3:5.2.4-1ubuntu2.3UBUNTU-CVE-2026-1287
Ubuntu:26.04:LTSpython-django3:5.2.9-0ubuntu3UBUNTU-CVE-2026-1287

Affected products (as reported)

VendorProductVersions
djangoproject Django 6.0 – before 6.0.25.2 – before 5.2.114.2 – before 4.2.28

Weakness: CWE-89 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

References