CVE-2024-53908
Django vulnerability analysis and mitigation

Overview

A SQL injection vulnerability (CVE-2024-53908) was discovered in Django versions 5.1 before 5.1.4, 5.0 before 5.0.10, and 4.2 before 4.2.17. The vulnerability affects the direct usage of django.db.models.fields.json.HasKey lookup when using an Oracle database, specifically when untrusted data is used as an lhs value. Applications using the jsonfield.haskey lookup via _ syntax are not affected (Django Security, OpenWall).

Technical details

The vulnerability exists in the HasKey lookup functionality when used with Oracle databases. When untrusted data is used as an lhs (left-hand side) value in direct usage of django.db.models.fields.json.HasKey lookup, it can lead to SQL injection. The issue has been assigned a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, indicating the highest severity level (NVD).

Impact

If successfully exploited, this vulnerability could allow an attacker to perform SQL injection attacks against applications using Oracle databases with Django's HasKey lookup functionality. The high CVSS score indicates potential for complete compromise of system confidentiality, integrity, and availability through remote exploitation without requiring privileges or user interaction (CISA-ADP).

Mitigation and workarounds

The Django team has released patches for all affected versions: Django 5.1.4, Django 5.0.10, and Django 4.2.17. Users are strongly encouraged to upgrade to these patched versions as soon as possible. For those unable to upgrade immediately, using the jsonfield.haskey lookup through the _ syntax instead of direct HasKey lookup provides a workaround as this usage pattern is unaffected by the vulnerability (Django Security).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management