Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2026-1312— Potential SQL injection via QuerySet.order_by and FilteredRelation

Quick assessment

Affected
djangoproject Django
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Django是Django基金会的一套基于Python语言的开源Web应用框架。该框架包括面向对象的映射器、视图系统、模板系统等。 Django 6.0.2之前版本、5.2.11之前版本和4.2.28之前版本存在安全漏洞,该漏洞源于.QuerySet.order_by在包含句点的列别名中,当相同别名在FilteredRelation中使用特制字典时,可能导致SQL注入攻击。

AI Predicted 8.8 Difficulty: Easy EPSS 0.80% · P54

Possible ATT&CK Techniques 1 AI

T1190 · Exploit Public-Facing Application

Affected Version Matrix 6

VendorProduct Version RangeStatus
djangoproject Django 6.0< 6.0.2 affected
6.0.2 unaffected
5.2< 5.2.11 affected
5.2.11 unaffected
4.2< 4.2.28 affected
4.2.28 unaffected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-1312

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Potential SQL injection via QuerySet.order_by and FilteredRelation
Source: CVE Program / CVE List V5
Vulnerability 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. `.QuerySet.order_by()` is subject to SQL injection in column aliases containing periods when the same alias is, using a suitably crafted dictionary, with dictionary expansion, used in `FilteredRelation`. 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.
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
SQL命令中使用的特殊元素转义处理不恰当(SQL注入)
Source: CVE Program / CVE List V5
Vulnerability Title
Django 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Django是Django基金会的一套基于Python语言的开源Web应用框架。该框架包括面向对象的映射器、视图系统、模板系统等。 Django 6.0.2之前版本、5.2.11之前版本和4.2.28之前版本存在安全漏洞,该漏洞源于.QuerySet.order_by在包含句点的列别名中,当相同别名在FilteredRelation中使用特制字典时,可能导致SQL注入攻击。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
djangoproject Django 6.0 ~ 6.0.2 -

II. Public POCs for CVE-2026-1312

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-1312

登录查看更多情报信息。

Vendor Advisories for CVE-2026-1312 (1)

Mailing List Discussions for CVE-2026-1312 (1)

Security Blog Posts for CVE-2026-1312 (1)

Same Patch Batch · djangoproject · 2026-02-03 · 6 CVEs total

CVE-2026-1287 Potential SQL injection in column aliases via control characters
CVE-2026-1285 Potential denial-of-service vulnerability in django.utils.text.Truncator HTML methods
CVE-2026-1207 Potential SQL injection via raster lookups on PostGIS
CVE-2025-14550 Potential denial-of-service vulnerability via repeated headers when using ASGI
CVE-2025-13473 Username enumeration through timing difference in mod_wsgi authentication handler

IV. Related Vulnerabilities

V. Comments for CVE-2026-1312

No comments yet


Leave a comment