VYPR
High severityNVD Advisory· Published Dec 6, 2024· Updated Dec 6, 2024

CVE-2024-53908

CVE-2024-53908

Description

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.)

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Django's HasKey lookup on Oracle is vulnerable to SQL injection when untrusted lhs values are used, affecting versions before 5.1.4, 5.0.10, and 4.2.17.

Vulnerability

Description

CVE-2024-53908 is a SQL injection vulnerability in Django's django.db.models.fields.json.HasKey lookup when used with an Oracle database. The issue arises when untrusted data is passed as the left-hand side (lhs) value, allowing an attacker to inject arbitrary SQL. Applications using the jsonfield.has_key lookup via double underscores (__) are unaffected [3].

Exploitation

To exploit this vulnerability, an attacker must be able to supply untrusted input to the lhs of a HasKey lookup. This scenario typically occurs when user-controlled data is directly used in a database query without proper sanitization. The vulnerability is specific to Oracle databases, as the underlying SQL generation handles the lhs differently on that platform [4].

Impact

Successful exploitation allows an attacker to execute arbitrary SQL commands on the Oracle database, potentially leading to data leakage, modification, or deletion. The severity depends on the database permissions of the Django application [3].

Mitigation

The Django team has released patched versions: 5.1.4, 5.0.10, and 4.2.17. Users are strongly advised to upgrade immediately. No workarounds are available for Oracle databases, but the issue does not affect other database backends [4].

AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
DjangoPyPI
>= 5.0.0, < 5.0.105.0.10
DjangoPyPI
>= 5.1.0, < 5.1.45.1.4
DjangoPyPI
>= 4.2.0, < 4.2.174.2.17
djangoPyPI
>= 5.1, < 5.1.45.1.4
djangoPyPI
>= 5.0, < 5.0.105.0.10
djangoPyPI
>= 4.2, < 4.2.174.2.17

Affected products

29

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

8

News mentions

0

No linked articles in our index yet.