CVE-2024-42005

python-django: Potential SQL injection in QuerySet.values() and values_list()

Published Aug 7, 2024 CVSS 3.1 · 9.8 Critical EPSS 1.5% KEV · Not listed
Description
An issue was discovered in Django 5.0 before 5.0.8 and 4.2 before 4.2.15. QuerySet.values() and values_list() methods on models with a JSONField are subject to SQL injection in column aliases via a crafted JSON object key as a passed *arg.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4458-1 python-django security update
Debian DSA Debian DSA DSA-6136-1 python-django security update
Github GHSA Github GHSA GHSA-pv4p-cwwg-4rph Django SQL injection vulnerability
Ubuntu USN Ubuntu USN USN-6946-1 Django vulnerabilities
History
Type Values Removed Values Added
First Time appeared Redhat discovery
Redhat rhui
CPEs cpe:/a:redhat:rhui:4::el8
cpe:/o:redhat:discovery:1.0::el9
Vendors & Products Redhat discovery
Redhat rhui
Type Values Removed Values Added
First Time appeared Redhat satellite
Redhat satellite Capsule
CPEs cpe:/a:redhat:satellite:6.16::el8
cpe:/a:redhat:satellite:6.16::el9
cpe:/a:redhat:satellite_capsule:6.16::el8
cpe:/a:redhat:satellite_capsule:6.16::el9
Vendors & Products Redhat satellite
Redhat satellite Capsule
Type Values Removed Values Added
First Time appeared Redhat
Redhat ansible Automation Platform
CPEs cpe:/a:redhat:ansible_automation_platform:2.4::el8
cpe:/a:redhat:ansible_automation_platform:2.4::el9
Vendors & Products Redhat
Redhat ansible Automation Platform
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Djangoproject
Djangoproject django
CPEs cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*
Vendors & Products Djangoproject
Djangoproject django
Metrics cvssV3_1

{'score': 7.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L'}

cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Title python-django: Potential SQL injection in QuerySet.values() and values_list()
Weaknesses CWE-89
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L'}

threat_severity

Moderate

Type Values Removed Values Added
Description An issue was discovered in Django 5.0 before 5.0.8 and 4.2 before 4.2.15. QuerySet.values() and values_list() methods on models with a JSONField are subject to SQL injection in column aliases via a crafted JSON object key as a passed *arg.
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Nov 4, 2025, 4:13 PM
Reserved
Jul 26, 2024, 12:00 AM
Status
Modified
Published
Aug 7, 2024, 3:15 PM
Modified
Jun 17, 2026, 7:48 AM
Severity
Moderate
Public date
Aug 6, 2024, 1:00 PM