RULE(RULE ID:336961)

Rule General Information
Release Date: 2022-08-18
Rule Name: Django SQL Injection Vulnerability (CVE-2022-34265)
Severity:
CVE ID:
Rule Protection Details
Description: An issue was discovered in Django 3.2 before 3.2.14 and 4.0 before 4.0.6. The Trunc() and Extract() database functions are subject to SQL injection if untrusted data is used as a kind/lookup_name value. Applications that constrain the lookup name and kind choice to a known safe list are unaffected.
Impact: An attacker can inject arbitrary sql commands to view or change the database of the target by exploiting the vulnerability successfully.
Affected OS: Windows, Linux, Others
Reference: https://docs.djangoproject.com/en/4.0/releases/security/
https://groups.google.com/forum/#!forum/django-announce
https://www.djangoproject.com/weblog/2022/jul/04/security-releases/
Solutions
The vendor has released upgrade patches to fix vulnerabilities, please visit:
https://www.djangoproject.com/weblog/2022/jul/04/security-releases/