{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-34265","id":"CVE-2022-34265","title":"Django `Trunc()` and `Extract()` database functions vulnerable to SQL Injection","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.","descriptionLong":"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.","published":"2022-07-04T00:00:00.000Z","updated":"2026-11-16T10:45:09.474003099Z","reserved":"2022-06-21T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"mitre","metric":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},"metrics":[{"version":"4.0","score":null,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"critical","source":"GitHub"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"GitHub"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","rating":"high","source":"NVD"}],"rating":"critical","products":[],"affectedProducts":[{"vendor":"n/a","product":"n/a","defaultStatus":null,"versions":[{"version":"n/a","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"django","purl":"pkg:pypi/django","ranges":[">=3.2a1 <3.2.14",">=4.0a1 <4.0.6",">=3.2 <3.2.14",">=4.0 <4.0.6"],"fixed":["3.2.14","4.0.6"],"advisory":"GHSA-p64x-8rxx-wf6q"}],"cwes":["CWE-89"],"aliases":["BIT-django-2022-34265","GHSA-p64x-8rxx-wf6q","PYSEC-2022-213"],"references":[{"url":"https://groups.google.com/forum/#%21forum/django-announce","tags":["x_transferred","web"]},{"url":"https://docs.djangoproject.com/en/4.0/releases/security/","tags":["x_transferred","Patch","Vendor Advisory","web"]},{"url":"https://www.djangoproject.com/weblog/2022/jul/04/security-releases/","tags":["x_transferred","Patch","Vendor Advisory","article"]},{"url":"https://security.netapp.com/advisory/ntap-20220818-0006/","tags":["x_transferred","Third Party Advisory","advisory"]},{"url":"https://www.debian.org/security/2022/dsa-5254","tags":["vendor-advisory","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK/","tags":["vendor-advisory","x_transferred","advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI/","tags":["vendor-advisory","x_transferred","advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/34xxx/CVE-2022-34265.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-34265","tags":["advisory"]},{"url":"https://github.com/django/django/commit/0dc9c016fadb71a067e5a42be30164e3f96c0492","tags":["web"]},{"url":"https://github.com/django/django/commit/5e2f4ddf2940704a26a4ac782b851989668d74db","tags":["web"]},{"url":"https://github.com/django/django/commit/877c800f255ccaa7abde1fb944de45d1616f5cc9","tags":["web"]},{"url":"https://github.com/django/django/commit/a9010fe5555e6086a9d9ae50069579400ef0685e","tags":["web"]},{"url":"https://docs.djangoproject.com/en/4.0/releases/security","tags":["web"]},{"url":"https://github.com/advisories/GHSA-p64x-8rxx-wf6q","tags":["advisory"]},{"url":"https://github.com/django/django","tags":["package"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2022-213.yaml","tags":["web"]},{"url":"https://groups.google.com/forum/#!forum/django-announce","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI","tags":["web"]},{"url":"https://security.netapp.com/advisory/ntap-20220818-0006","tags":["web"]},{"url":"https://www.djangoproject.com/weblog/2022/jul/04/security-releases","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.73607,"epssPercentile":0.99479,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-34265","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-34265","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-34265","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-p64x-8rxx-wf6q","ok":true,"note":"GHSA-p64x-8rxx-wf6q"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-34265","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":["django"],"critical":["CVSS 9.8 in a widely used technology","EPSS 74% with CVSS 9.8"],"attention":null}