Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. Django
  4. ›
  5. CVE-2024-53908

CVE-2024-53908: Django SQL injection in HasKey(lhs, rhs) on Oracle

December 6, 2024 (updated January 14, 2025)

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

References

  • docs.djangoproject.com/en/dev/releases/security
  • github.com/advisories/GHSA-m9g8-fxxm-xg86
  • github.com/django/django
  • github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2024-157.yaml
  • groups.google.com/g/django-announce
  • nvd.nist.gov/vuln/detail/CVE-2024-53908
  • www.djangoproject.com/weblog/2024/dec/04/security-releases
  • www.openwall.com/lists/oss-security/2024/12/04/3

Code Behaviors & Features

Detect and mitigate CVE-2024-53908 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 4.2.0 before 4.2.17, all versions starting from 5.0.0 before 5.0.10, all versions starting from 5.1.0 before 5.1.4

Fixed versions

  • 5.0.10
  • 5.1.4
  • 4.2.17

Solution

Upgrade to versions 4.2.17, 5.0.10, 5.1.4 or above.

Impact 9.8 CRITICAL

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

Learn more about CVSS

Weakness

  • CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Source file

pypi/Django/CVE-2024-53908.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:03 +0000.