{"id":"CVE-2022-34265","published":"2022-07-04T00:00:00Z","modified":"2025-02-13T16:32:45Z","title":"An issue was discovered in Django 3.2 before 3.2.14 and 4.0 before 4.0.6","vendor":null,"product":null,"tier":"core","eol":null,"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"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.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T07:16:12Z"},"cvss":null,"epss":{"score":0.73607,"percentile":0.99469,"date":"2026-11-02","provenance":"source"},"kev":null,"vulncheckKev":null,"exploited":false,"otx":{"pulseCount":1,"pulses":[{"name":"Midwest Malware","url":"https://otx.alienvault.com/pulse/6a8e6c8dc6d3df83aac08378","created":"2026-08-26"}],"provenance":"machine"},"cwes":[],"references":[{"url":"https://groups.google.com/forum/#%21forum/django-announce","tags":[]},{"url":"https://docs.djangoproject.com/en/4.0/releases/security/","tags":[]},{"url":"https://www.djangoproject.com/weblog/2022/jul/04/security-releases/","tags":[]},{"url":"https://security.netapp.com/advisory/ntap-20220818-0006/","tags":[]},{"url":"https://www.debian.org/security/2022/dsa-5254","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI/","tags":["vendor-advisory"]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"PyPI","package":"Django","vulnerableRanges":[">=3.2a1, <3.2.14",">=4.0a1, <4.0.6",">=3.2, <3.2.14",">=4.0, <4.0.6"],"patched":["3.2.14","4.0.6"],"from":["GHSA-p64x-8rxx-wf6q","PYSEC-2022-213"],"provenance":"source"}],"advisories":[{"id":"GHSA-p64x-8rxx-wf6q","url":"https://github.com/advisories/GHSA-p64x-8rxx-wf6q","severity":"CRITICAL","ecosystem":"PyPI","package":"Django","vulnerableRanges":[">=3.2a1, <3.2.14"],"patched":["3.2.14"],"provenance":"source","from":"GHSA"},{"id":"GHSA-p64x-8rxx-wf6q","url":"https://github.com/advisories/GHSA-p64x-8rxx-wf6q","severity":"CRITICAL","ecosystem":"PyPI","package":"Django","vulnerableRanges":[">=4.0a1, <4.0.6"],"patched":["4.0.6"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2022-0091","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2022-0091","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":{"pocGithub":{"count":5,"skipped":0,"earliest":"2022-07-07","earliestUrl":"https://github.com/aeyesec/CVE-2022-34265","repos":[{"name":"aeyesec/CVE-2022-34265","url":"https://github.com/aeyesec/CVE-2022-34265","stars":124,"created":"2022-07-07"},{"name":"ZhaoQi99/CVE-2022-34265","url":"https://github.com/ZhaoQi99/CVE-2022-34265","stars":4,"created":"2022-08-24"},{"name":"traumatising/CVE-2022-34265","url":"https://github.com/traumatising/CVE-2022-34265","stars":3,"created":"2022-07-13"},{"name":"lnwza0x0a/CTF_Django_CVE-2022-34265","url":"https://github.com/lnwza0x0a/CTF_Django_CVE-2022-34265","stars":1,"created":"2022-09-08"},{"name":"CyberCTF/vulhub-django-cve-2022-34265","url":"https://github.com/CyberCTF/vulhub-django-cve-2022-34265","stars":0,"created":"2026-10-08"}]},"first":{"date":"2022-07-07","source":"PoC-in-GitHub","url":"https://github.com/aeyesec/CVE-2022-34265"},"provenance":"source"},"exploitRefs":[],"flow":[],"timeline":[{"date":"2022-07-04","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2022-34265","provenance":"source"},{"date":"2022-07-07","kind":"exploit-public","label":"First public exploit: PoC-in-GitHub","url":"https://github.com/aeyesec/CVE-2022-34265","provenance":"source"}],"speed":{"daysToPublicExploit":3,"firstExploitFrom":"PoC-in-GitHub","daysToKev":null},"priority":{"score":25.6,"factors":[{"name":"In a KEV catalog","points":0.0,"detail":"not listed"},{"name":"Recent KEV listing","points":0.0,"detail":"not listed"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.89,"detail":"percentile 0.9947"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"5 PoC-in-GitHub repos"},{"name":"Mentioned in OTX pulses","points":0.68,"detail":"1 pulse"},{"name":"CVSS severity","points":0.0,"detail":"no CVSS"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]},"lineage":{"packageHistory":[{"cve":"CVE-2022-23833","published":"2022-02-03","fixed":"4.0.2","kev":false},{"cve":"CVE-2022-28346","published":"2022-04-12","fixed":"4.0.4","kev":false,"link":{"from":"CVE-2022-28346","to":"CVE-2022-34265","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:Django","fromFixed":"3.2.13","toFixed":"3.2.14","daysApart":83},{"kind":"version-step","provenance":"source","package":"PyPI:Django","fromFixed":"4.0.4","toFixed":"4.0.6","daysApart":83}]}},{"cve":"CVE-2022-28347","published":"2022-04-12","fixed":"4.0.4","kev":false},{"cve":"CVE-2022-34265","published":"2022-07-04","fixed":"4.0.6","kev":false},{"cve":"CVE-2022-36359","published":"2022-08-03","fixed":"4.0.7","kev":false,"link":{"from":"CVE-2022-34265","to":"CVE-2022-36359","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:Django","fromFixed":"3.2.14","toFixed":"3.2.15","daysApart":30},{"kind":"version-step","provenance":"source","package":"PyPI:Django","fromFixed":"4.0.6","toFixed":"4.0.7","daysApart":30}]}},{"cve":"CVE-2022-41323","published":"2022-10-16","fixed":"4.1.2","kev":false},{"cve":"CVE-2023-23969","published":"2023-02-01","fixed":"4.1.6","kev":false}],"package":"PyPI:Django"}}