CriticalFix available
python-django — security advisory
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.
- Products
- python-django
- Affected versions
- Not specified
- Fixed versions
- 2:4.0.6-1
- CVEs
- CVE-2022-34265
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 30 Oct 2026, 15:29 UTC · Revision 1
Source evidence
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.
osv:DEBIAN-CVE-2022-34265
python-django
Fixed versions: 2:4.0.6-1
python-django
Fixed versions: 2:4.0.6-1
python-django
Fixed versions: 2:4.0.6-1
Complete source record
{
"id": "71b804decec3e73083ba7b7b0c77f0cce68bf6244fde4a5fa0e8d2a39869d288",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2022-34265",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2022-34265",
"summary": "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.",
"evidence": "osv:DEBIAN-CVE-2022-34265",
"products": [
{
"name": {
"value": "python-django",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2:4.0.6-1",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "python-django",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2:4.0.6-1",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "python-django",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2:4.0.6-1",
"evidence": "/affected/2/ranges"
}
],
"affected_versions": []
}
],
"severity": "critical",
"structured": {
"id": "DEBIAN-CVE-2022-34265",
"aliases": [
"DEBIAN-CVE-2022-34265"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2:4.0.6-1"
}
]
}
],
"package": {
"name": "python-django",
"purl": "pkg:deb/debian/python-django?arch=source&distro=bookworm",
"ecosystem": "Debian:12"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-34265.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2:4.0.6-1"
}
]
}
],
"package": {
"name": "python-django",
"purl": "pkg:deb/debian/python-django?arch=source&distro=trixie",
"ecosystem": "Debian:13"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-34265.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2:4.0.6-1"
}
]
}
],
"package": {
"name": "python-django",
"purl": "pkg:deb/debian/python-django?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-34265.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
],
"modified": "2026-10-15T08:03:04.128754153Z",
"provider": "osv",
"upstream": [
"CVE-2022-34265"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2022-34265"
]
},
"related_cves": [
{
"value": "CVE-2022-34265",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 325036,
"published_at": "2022-07-04T16:15:09.26+00:00"
}