Loading...
Skip to main content

CVE-2024-53908 — Django SQL injection in django — CVE Details

HIGH

Django SQL injection in HasKey(lhs, rhs) on Oracle

Published December 6, 2024Updated September 10, 2026Source: osv

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 (675 days ago).
  • Last revised September 10, 2026 — 643 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

pip
Update django to 5.1.4 or later
pip install "django>=5.1.4"
pip
Update django to 5.1.4 or later
pip install "django>=5.1.4"
pip
Update django to 4.2.17 or later
pip install "django>=4.2.17"
pip
Update django to 5.0.10 or later
pip install "django>=5.0.10"
pip
Update django to 5.0.10 or later
pip install "django>=5.0.10"
pip
Update django to 4.2.17 or later
pip install "django>=4.2.17"

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (6)

Affects 1 ecosystem: pypi (1).

PackageEcosystemAffectedFixed In
django
pypi
5.1, 5.1.1, 5.1.2, 5.1.35.1.4
django
pypi
5.1, 5.1.1, 5.1.2, 5.1.35.1.4
django
pypi
4.2, 4.2.1, 4.2.10, 4.2.11 (+13 more)4.2.17
django
pypi
5.0, 5.0.1, 5.0.2, 5.0.3 (+6 more)5.0.10
django
pypi
5.0, 5.0.1, 5.0.2, 5.0.3 (+6 more)5.0.10
django
pypi
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.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

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. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-53908 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-m9g8-fxxm-xg86
BIT-django-2024-53908
PYSEC-2024-157

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies