Potential SQL injection in column aliases via control characters
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-1287
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 10:17 UTC · Revision 1
Source evidence
Potential SQL injection in column aliases via control characters
core-osv · Original sourcePublished 3 Feb 2026, 14:36 UTC
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.
osv:CVE-2026-1287
Complete source record
{
"id": "b58f84d29919e017f58aaad86c5ca91ff269a55054c8ad90b7e7cf786a58842e",
"url": "https://osv.dev/vulnerability/CVE-2026-1287",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Potential SQL injection in column aliases via control characters",
"summary": "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.",
"evidence": "osv:CVE-2026-1287",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2026-1287",
"aliases": [
"BIT-django-2026-1287",
"CVE-2026-1287",
"GHSA-gvg8-93h5-g6qq",
"PYSEC-2026-46"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/django/django",
"type": "GIT",
"events": [
{
"introduced": "97aa3b7f08f51669e118f3af5ca91026e39664c3"
},
{
"fixed": "20c71f6b91324cf401056c72136c14e0ec2bf7bf"
},
{
"introduced": "9e7cc2b628fe8fd3895986af9b7fc9525034c1b0"
},
{
"fixed": "4a96a199bbb1d3dca45ea16bf643216e179cb8bc"
},
{
"introduced": "36b5f39d9372147f0e758f590e35ee2b2bc317dd"
},
{
"fixed": "ba00558ddac694d92b05d12ecd2a5b7fcc1de025"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "4.2"
},
{
"fixed": "4.2.28"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "5.2"
},
{
"fixed": "5.2.11"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "6.0"
},
{
"fixed": "6.0.2"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"6.0.1",
"5.2.10",
"6.0",
"5.2.9",
"5.2.8",
"5.2.7",
"5.2.6",
"5.2.5",
"5.2.4",
"5.2.3",
"5.2.2",
"5.2.1",
"5.2"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-1287.json"
}
}
],
"modified": "2026-10-28T02:30:27.662417845Z",
"provider": "osv",
"references": [
"https://github.com/django/django/",
"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-1287.json",
"https://access.redhat.com/errata/RHSA-2026:14835",
"https://access.redhat.com/errata/RHSA-2026:2694",
"https://access.redhat.com/errata/RHSA-2026:3958",
"https://access.redhat.com/errata/RHSA-2026:3959",
"https://access.redhat.com/errata/RHSA-2026:3960",
"https://access.redhat.com/errata/RHSA-2026:3962",
"https://access.redhat.com/errata/RHSA-2026:5970",
"https://access.redhat.com/errata/RHSA-2026:5971",
"https://access.redhat.com/errata/RHSA-2026:6291",
"https://access.redhat.com/security/cve/CVE-2026-1287",
"https://docs.djangoproject.com/en/dev/releases/security/",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/1xxx/CVE-2026-1287.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-1287",
"https://www.djangoproject.com/weblog/2026/feb/03/security-releases/",
"https://bugzilla.redhat.com/show_bug.cgi?id=2436339",
"https://pypi.org/project/Django/",
"https://groups.google.com/g/django-announce"
],
"provider_metadata": {
"cwe_ids": [
"CWE-89"
],
"cna_assigner": "DSF",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/1xxx/CVE-2026-1287.json"
}
},
"related_cves": [
{
"value": "CVE-2026-1287",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 494433,
"published_at": "2026-02-03T14:36:03.63+00:00"
}