Impact
An expressed vulnerability within Django’s QuerySet machinery allows an attacker to inject arbitrary SQL through column aliases when control characters are included in the keyword arguments supplied to methods such as annotate(), aggregate(), extra(), values(), values_list(), and alias(). The flaw exists because dictionary expansion during alias resolution does not properly escape these control characters, enabling execution of unintended SQL statements. If exploited, an attacker could read, modify, or delete data in the underlying database, potentially compromising confidentiality, integrity, or availability of application data.
Affected Systems
The issue is present in Django releases 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28. Initial reports also indicate that older, unsupported series such as 5.0.x, 4.1.x, and 3.2.x were not evaluated and may have similar weaknesses. Systems running any affected versions of the Django framework on any platform are at risk.
Risk and Exploitability
The CVSS score of 5.4 indicates a moderate severity. The EPSS score is reported as less than 1%, suggesting a low probability of exploitation in the wild at the time of this assessment. Because the vulnerability is triggered by crafted dictionary inputs, an attacker would need access to a code path that accepts unsanitized keyword arguments for the aforementioned QuerySet methods, which could be through a web API, admin interface, or internal function. No known public exploits or KEV entries are listed, so the threat is primarily theoretical at this point, but the ability to inject arbitrary SQL remains a significant risk if the flaw exists in deployed code.
OpenCVE Enrichment
Debian DLA
Debian DSA
Github GHSA
Ubuntu USN