Patchfirst
CVE-2022-34265 Public exploit EPSS 73.6%

An issue was discovered in Django 3.2 before 3.2.14 and 4.0 before 4.0.6

Fix:upgrade Django to 4.0.10 or later also fixes CVE-2023-24580 Details ↓

Summary

The flaw is a SQL injection issue in Django's Trunc() and Extract() database functions, affecting Django 3.2 before 3.2.14 and 4.0 before 4.0.6. An attacker who can supply untrusted data used as the kind or lookup_name value can inject SQL, though applications that restrict these values to a known safe list are not affected.

Official description · CVE.org

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.

Breakdown
25.6 / 100
Exploited
Not confirmed
Reports
0
Tactics
0/15

Public exploit code (PoC-in-GitHub) appeared 3 days after disclosure. No confirmed exploitation is recorded.

  1. Disclosedday 0
  2. Public exploit codePoC-in-GitHub+3 days

7 fixes in Django over 12 months. The latest fix listed for Django is 4.1.6.

Fixes in DjangoPyPI package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 4.0.2CVE-2022-238333 Feb 2022
  2. 4.0.4CVE-2022-2834612 Apr 2022
  3. 4.0.4CVE-2022-2834712 Apr 2022
  4. 4.0.6CVE-2022-342654 Jul 2022
  5. 4.0.7CVE-2022-363593 Aug 2022
  6. 4.1.2CVE-2022-4132316 Oct 2022
  7. 4.1.6CVE-2023-239691 Feb 2023Latest listed

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: Django.

Upgrade to 4.0.10 or later

Fixes this CVE and 1 other known vulnerability in this package (CVE-2023-24580).

pippip install "Django>=4.0.10"

First fixed in 4.0.6 for CVE-2022-34265.

Affected versions, by release line

If you runUpgrade to
4.0a1 up to 4.0.64.0.10first fix for this CVE: 4.0.6
3.2a1 up to 3.2.143.2.23first fix for this CVE: 3.2.14

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

Also mentioned in 1 community threat pulse (AlienVault OTX)

Weaker evidence

Pulses are indicator collections that anyone can publish. A mention is not confirmation of exploitation.

References

7 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close