CVE-2022-34265

NameCVE-2022-34265
DescriptionAn 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-3164-1, DSA-5254-1, ELA-640-1
Debian Bugs1014541

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
python-django (PTS)jessie, jessie (lts)1.7.11-1+deb8u17fixed
stretch (security)1:1.10.7-2+deb9u17vulnerable
stretch (lts), stretch1:1.10.7-2+deb9u23fixed
buster, buster (lts)1:1.11.29-1+deb10u12fixed
buster (security)1:1.11.29-1+deb10u11fixed
bullseye (security), bullseye2:2.2.28-1~deb11u2fixed
bookworm (security), bookworm3:3.2.19-1+deb12u1fixed
sid, trixie3:4.2.16-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
python-djangosourcejessie(not affected)
python-djangosourcestretch1:1.10.7-2+deb9u18ELA-640-1
python-djangosourcebuster1:1.11.29-1+deb10u2DLA-3164-1
python-djangosourcebullseye2:2.2.28-1~deb11u1DSA-5254-1
python-djangosource(unstable)2:4.0.6-11014541

Notes

https://www.openwall.com/lists/oss-security/2022/07/04/2
https://www.djangoproject.com/weblog/2022/jul/04/security-releases/
https://github.com/django/django/commit/54eb8a374d5d98594b264e8ec22337819b37443c (main)
https://github.com/django/django/commit/0dc9c016fadb71a067e5a42be30164e3f96c0492 (4.0.6)
https://github.com/django/django/commit/a9010fe5555e6086a9d9ae50069579400ef0685e (3.2.14)
[jessie] - python-django <not-affected> (database functions such as Trunc and Extract added later)

Search for package or bug name: Reporting problems