PT-2025-45119 · Django+4 · Django+4

·

CVE-2025-64459

·

Published

2025-11-05

·

Updated

2026-09-01

CVSS v2.0

9.4

Critical

VectorAV:N/AC:L/Au:N/C:C/I:C/A:N
Name of the Vulnerable Software and Affected Versions Django versions 5.1 through 5.1.13 Django versions 4.2 through 4.2.25 Django versions 5.2 through 5.2.7 Django versions 5.0.x and earlier Django versions 4.1.x and earlier Django versions 3.2.x and earlier
Description An issue exists in the QuerySet.filter(), QuerySet.exclude(), and QuerySet.get() methods, as well as the Q() class, where they are subject to SQL injection. This occurs when a suitably crafted dictionary is used with dictionary expansion as the connector argument. An attacker can exploit this by passing internal query parameters through URL query strings or POST data that are then passed directly into these methods. This can lead to database logic manipulation, such as changing AND logic to OR, potentially resulting in authentication bypass, privilege escalation, and the unauthorized disclosure or modification of protected information.
Recommendations Update Django versions 5.1 through 5.1.13 to version 5.1.14. Update Django versions 4.2 through 4.2.25 to version 4.2.26. Update Django versions 5.2 through 5.2.7 to version 5.2.8. Avoid passing user-controlled data, such as request.GET.dict(), directly into QuerySet methods via dictionary expansion. Implement whitelisting of allowed filtering parameters or use explicit field mapping instead of dictionary expansion. Use Django Forms to validate input data. As a temporary mitigation, restrict or audit the use of the connector and negated parameters in incoming requests.

Exploit

Fix

DoS

SQL injection

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

BDU:2025-13913
BIT-DJANGO-2025-64459
CVE-2025-64459
DLA-4425-1
ECHO-1DC5-AF13-00C1
GHSA-FRMV-PR5F-9MCR
MGASA-2025-0292
OESA-2025-2676
OESA-2025-2677
OESA-2025-2678
OESA-2025-2679
OESA-2025-2680
OESA-2026-1206
OPENSUSE-SU-2025:15708-1
OPENSUSE-SU-2025:15712-1
OPENSUSE-SU-2025:20153-1
OPENSUSE-SU-2026:10005-1
OPENSUSE-SU-2026:11270-1
PYSEC-2025-108
RHSA-2025:23069
RHSA-2025:23070
SUSE-SU-2025:4100-1
USN-7859-1

Affected Products

Debian
Django
Linuxmint
Red Os
Ubuntu