REDHAT-BUG-2412651: SQL Injection
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.
Affected Software
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2412651?
REDHAT-BUG-2412651 is considered a high severity vulnerability due to the potential for SQL injection attacks.
Which versions of Django are affected by REDHAT-BUG-2412651?
Django versions 5.1 before 5.1.14, 4.2 before 4.2.26, and 5.2 before 5.2.8 are affected by REDHAT-BUG-2412651.
How do I fix REDHAT-BUG-2412651?
To fix REDHAT-BUG-2412651, update Django to a version that is not affected, such as 5.1.14 or later, 4.2.26 or later, or 5.2.8 or later.
What types of queries are vulnerable in REDHAT-BUG-2412651?
The methods QuerySet.filter(), QuerySet.exclude(), QuerySet.get(), and the class Q() are vulnerable to SQL injection in REDHAT-BUG-2412651.
How can I determine if my application is affected by REDHAT-BUG-2412651?
Check your Django version against the versions listed in REDHAT-BUG-2412651 and review your code for the usage of the vulnerable methods with dictionary expansion.