CRITICAL🇵🇱 Wersja polska

CVE-2025-64459

CVSS 9.1v3.1pub. 2025-11-05upd. 2025-11-10

An issue was discovered in 5.1 before 5.1.14, 4.2 before 4.2.26, and 5.2 before 5.2.8. The methods `QuerySet.filter()`, `QuerySet.exclude()`, and `QuerySet.get()`, and the class `Q()`, are subject to SQL injection when using a suitably crafted dictionary, with dictionary expansion, as the `_connector` argument. 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 cyberstan for reporting this issue.

🤖 AI Analysis
How it works

The vulnerability affects the QuerySet.filter(), QuerySet.exclude(), and QuerySet.get() methods, as well as the Q() class. An attacker can pass a specially crafted dictionary with expansion (dictionary expansion) as the _connector argument to one of the mentioned methods. Django does not properly validate this value, allowing arbitrary SQL code injection into the generated query. The attack does not require authentication or user interaction, and the vector is network-based.

Impact

An attacker can gain unauthorized access to sensitive data stored in the database (high impact on confidentiality) and modify or delete data (high impact on integrity). The vulnerability does not directly affect system availability.

Mitigation & patch

Django must be updated immediately to version 5.1.14, 4.2.26, or 5.2.8 (depending on the branch in use). Details are available in the official security advisory: https://www.djangoproject.com/weblog/2025/nov/05/security-releases/. Users of unsupported branches (e.g., 3.2.x, 4.1.x, 5.0.x) should urgently migrate to a supported version.

Who is affected

Django in versions: 5.1 before 5.1.14, 4.2 before 4.2.26, and 5.2 before 5.2.8. Older, unsupported branches (5.0.x, 4.1.x, 3.2.x) were not analyzed and may also be vulnerable.

Analysis generated by Claude AI (Anthropic) based on NVD data. Always verify with vendor.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
  • Djangoproject Django

    APP
    Djangoproject
    4.2 – 4.2.26 (excl.)5.1 – 5.1.14 (excl.)5.2 – 5.2.8 (excl.)
🔵
CHECK WITH VENDOR
No clear patch data available. Check vendor references.
Tags
SQLi
CWE
References

Related vulnerabilities

CVE-2026-4277CRITICAL9.8PL ✓same product

Django: brak walidacji uprawnień dodawania w GenericInlineModelAdmin

CVE-2024-53908CRITICAL9.8PL ✓same product

SQL Injection w Django przez HasKey lookup na bazie Oracle

CVE-2023-31047CRITICAL9.8PL ✓same product

Pominięcie walidacji przy wielokrotnym przesyłaniu plików w Django

CVE-2022-34265CRITICAL9.8PL ✓same product

SQL injection w funkcjach Trunc() i Extract() frameworka Django

CVE-2022-28346CRITICAL9.8PL ✓same product

SQL injection w metodach QuerySet Django przez aliasy kolumn