Vulnerability · Published Dec 6, 2024 · Assigned by mitre
CVE-2024-53908
Critical 9.8
In plain English
A critical-severity SQL injection in the py3-django package (Alpine). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.4% (higher than 73% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.)
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.21 | py3-django | 4.2.20-r0 | ALPINE-CVE-2024-53908 |
| Alpine:v3.22 | py3-django | 4.2.20-r0 | ALPINE-CVE-2024-53908 |
| Alpine:v3.23 | py3-django | 4.2.20-r0 | ALPINE-CVE-2024-53908 |
| Alpine:v3.24 | py3-django | 4.2.20-r0 | ALPINE-CVE-2024-53908 |
| Debian:13 | python-django | 3:4.2.17-1 | DEBIAN-CVE-2024-53908 |
| Debian:14 | python-django | 3:4.2.17-1 | DEBIAN-CVE-2024-53908 |
| PyPI | django | 4.2.17 | GHSA-m9g8-fxxm-xg86 |
| PyPI | django | 4.2.17, 5.0.10, 5.1.4 | PYSEC-2024-157 |
| PyPI | django | 5.0.10 | GHSA-m9g8-fxxm-xg86 |
| PyPI | django | 5.1.4 | GHSA-m9g8-fxxm-xg86 |
| PyPI | django | 4.2.17 | GHSA-m9g8-fxxm-xg86 |
| PyPI | django | 5.1.4 | GHSA-m9g8-fxxm-xg86 |
| PyPI | django | 5.0.10 | GHSA-m9g8-fxxm-xg86 |
| Ubuntu:22.04:LTS | python-django | 2:3.2.12-2ubuntu1.15 | USN-7136-1 |
| Ubuntu:24.04:LTS | python-django | 3:4.2.11-1ubuntu1.4 | USN-7136-1 |
| Ubuntu:24.04:LTS | python-django | 3:4.2.11-1ubuntu1.4 | UBUNTU-CVE-2024-53908 |
Affected products (as reported)
Weakness: CWE-89 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H