Skip to content
Heist/ feed
Back to feed
Critical

Security advisory

Type: advisorySources: OSVCVE: CVE-2024-53908

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

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-53908
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 18:15 UTC · Revision 1

Source evidence

CVE-2024-53908

core-osv · Original source

Published 6 Dec 2024, 00:00 UTC

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

osv:CVE-2024-53908
Complete source record
{
  "id": "73e65edfd69538180481ab319acd4ca3e5b12817476bd9e6651cb9f054cf85d5",
  "url": "https://osv.dev/vulnerability/CVE-2024-53908",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2024-53908",
    "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.)",
    "evidence": "osv:CVE-2024-53908",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2024-53908",
      "aliases": [
        "BIT-django-2024-53908",
        "CVE-2024-53908",
        "GHSA-m9g8-fxxm-xg86",
        "PYSEC-2024-157"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/django/django",
              "type": "GIT",
              "events": [
                {
                  "introduced": "97aa3b7f08f51669e118f3af5ca91026e39664c3"
                },
                {
                  "fixed": "1f0356ff2af11a5fa71fb07b4627e10edd170438"
                },
                {
                  "introduced": "52821001bb62b764d73e63812133f199b8fef9eb"
                },
                {
                  "fixed": "3b3a5f4efbf93692557b7f473519bd0ad8f04c6a"
                },
                {
                  "introduced": "84d09a547fe35e10018ab242602ca76c29ca91a1"
                },
                {
                  "fixed": "2d4add11fd57b05f7ea48e8b3e89e743c9871aa3"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.2"
                      },
                      {
                        "fixed": "4.2.17"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "5.0"
                      },
                      {
                        "fixed": "5.0.10"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "5.1"
                      },
                      {
                        "fixed": "5.1.4"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-53908.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:31.291848242Z",
      "provider": "osv",
      "references": [
        "https://docs.djangoproject.com/en/dev/releases/security/",
        "https://groups.google.com/g/django-announce",
        "https://www.openwall.com/lists/oss-security/2024/12/04/3",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/53xxx/CVE-2024-53908.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-53908"
      ],
      "provider_metadata": {
        "cna_assigner": "mitre",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/53xxx/CVE-2024-53908.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-53908",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 498321,
  "published_at": "2024-12-06T00:00:00+00:00"
}