CVE-2024-53908 — Django SQL injection in django — CVE Details
Django SQL injection in HasKey(lhs, rhs) on Oracle
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (1.87%). Schedule for your next planned update.
Does your project use an affected django version?
Paste your requirements.txt to check it for CVE-2024-53908 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
An issue was discovered in Django 5.1 before 5.1.4, 5.0 before 5.0.10, and 4.2 before 4.2.17. Direct usage of the django.db.models.fields.json.HasKey lookup, when an Oracle database is used, is subject to SQL injection if untrusted data is used as an lhs value. (Applications that use the jsonfield.has_key lookup via __ are unaffected.)
Advisory Timeline
- First published December 6, 2024 (720 days ago).
- Last revised September 10, 2026 — 643 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
pip install "django>=5.1.4"
pip install "django>=5.1.4"
pip install "django>=4.2.17"
pip install "django>=5.0.10"
pip install "django>=5.0.10"
pip install "django>=4.2.17"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (6)
Affects 1 ecosystem: PyPI (1).
| Package | Fixed In |
|---|---|
| django PyPI · Affected: 5.1, 5.1.1, 5.1.2, 5.1.3 | 5.1.4 |
| django PyPI · Affected: 5.1, 5.1.1, 5.1.2, 5.1.3 | 5.1.4 |
| django PyPI · Affected: 4.2, 4.2.1, 4.2.10, 4.2.11 (+13 more) | 4.2.17 |
| django PyPI · Affected: 5.0, 5.0.1, 5.0.2, 5.0.3 (+6 more) | 5.0.10 |
| django PyPI · Affected: 5.0, 5.0.1, 5.0.2, 5.0.3 (+6 more) | 5.0.10 |
| django PyPI · Affected: 4.2, 4.2.1, 4.2.10, 4.2.11 (+13 more) | 4.2.17 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-89SQL InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-53908ADVISORY
- https://docs.djangoproject.com/en/dev/releases/securityWEB
- https://github.com/django/djangoPACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2024-157.yamlWEB
- https://groups.google.com/g/django-announceWEB
- https://www.djangoproject.com/weblog/2024/dec/04/security-releasesWEB
- https://www.openwall.com/lists/oss-security/2024/12/04/3WEB
Frequently Asked Questions
- What is CVE-2024-53908?
- Django SQL injection in HasKey(lhs, rhs) on Oracle. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 9.8/10).
- How do I check if my project is affected by CVE-2024-53908?
- CVE-2024-53908 affects django. It has a 1.9% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-53908 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This places it in the top quartile of EPSS-scored vulnerabilities — 79.9% of tracked vulnerabilities score at or below it, so it is more likely to be exploited than most of the tracked corpus.
Also Known As
Related CVEs
- CVE-2025-64459CRITICAL
- CVE-2025-64458HIGH
- CVE-2022-36359HIGH
Django vulnerable to Reflected File Download attack
- CVE-2024-38875HIGH
Django vulnerable to Denial of Service
- CVE-2021-32052MEDIUM
Header injection possible in Django
- CVE-2026-48587LOW
Django: has_vary_header may expose cached responses when Vary values contain whitespace
- CVE-2022-22818
- CVE-2022-28346