S4E just found a high-severity finding from top 10 tcp port service scan
PlatformPlansPartners
Resources
ToolsBlogDocs
Sign Up →
critical·Product Based Web Vulnerabilities·Updated Nov 8, 2025

CVE-2022-34265 Scanner

Targets the Trunc() and Extract() database functions in Django ORM, allowing attackers to inject malicious SQL via crafted datetime parameters.

Est. Time~10 seconds
Scan TypeSingle Scan
Targetsurl
CostFree
3.3k
Times Used
continuous scan runs
4.2k
Continuously Checked
assets under CS
0
Vulnerabilities Found
confirmed findings
References
CVECVE-2022-34265
9.8
CVSS

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.

Attack Vector
-
Privileges Req.
-
User Interaction
-
Affected
n/aby n/a
n/a
Updated Aug 22, 2026View on NVD →
Detail

Django is a high-level Python web framework used by developers to build secure, scalable web applications quickly. It is popular among startups, enterprises, and individual developers for its built-in admin panel, ORM, and security features. Django powers many content management systems, e-commerce platforms, and data-driven websites across various industries.

CVE-2022-34265 is a critical SQL injection vulnerability in Django versions 3.2 and 4.0. It arises because the Trunc() and Extract() database functions do not properly sanitize user-supplied datetime parameters before constructing SQL queries. This flaw allows an attacker to break out of the intended query structure and execute arbitrary SQL commands.

The vulnerability specifically affects the Trunc() and Extract() functions when used with untrusted input for the 'kind' parameter. For example, if an application passes user-controlled data directly to these functions without validation, an attacker can inject SQL statements that modify the query logic. This can be exploited through any endpoint that uses these functions with external input.

If exploited, an attacker can read, modify, or delete sensitive data from the database, potentially gaining full control over the application. This could lead to data breaches, privilege escalation, or complete system compromise. Given the CVSS score of 9.8, immediate action is required to mitigate this critical risk.

Solution Advice
  • Upgrade Django to version 3.2.14, 4.0.6, or later to patch the vulnerability.
  • Use parameterized queries or Django's ORM safely to prevent SQL injection.
  • Validate and sanitize all user inputs, especially those passed to Trunc() and Extract().
  • Restrict the 'kind' parameter to a whitelist of allowed values (e.g., 'year', 'month', 'day').
  • Implement web application firewall (WAF) rules to block SQL injection patterns.
  • Conduct regular security audits and penetration testing on Django applications.
  • Monitor database logs for unusual query patterns indicative of exploitation.
  • Educate developers on secure coding practices to avoid similar vulnerabilities.

Get AI-powered remediation steps tailored to your asset.

Try AI Solutions →

Check your infrastructure.
Right now.

11,000+ scanners. Free to start. No credit card required.