CVE-2019-19118 Django allows unintended model editing
Attackers with view-only parent permissions can trigger side effects and modify inline models via Django admin, bypassing intended access controls.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2019-19118?
CVE-2019-19118 is a medium-severity missing authorization vulnerability in Djangoproject Django, published on 2 Dec 2019. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
Django 2.1 before 2.1.15 and 2.2 before 2.2.8 allows unintended model editing. A Django model admin displaying inline related models, where the user has view-only permissions to a parent model but edit permissions to the inline model, would be presented with an editing UI, allowing POST requests, for updating the inline model. Directly editing the view-only parent model was not possible, but the parent model's save() method was called, triggering potential side effects, and causing pre and post-save signal handlers to be invoked. (To resolve this, the Django admin is adjusted to require edit permissions on the parent model in order for inline models to be editable.)
Weakness: CWE-276
Which versions are affected by CVE-2019-19118?
5 open source packages ship an affected version, including django and Django. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
django PyPI | From 2.1 | 2.1.15, 2.2.8 |
django PyPI | From 2.1 | 2.1.15 |
django PyPI | From 2.2 | 2.2.8 |
Django PyPI | From 2.1 | 2.1.15 |
Django PyPI | From 2.2 | 2.2.8 |
Products include Djangoproject Django, Fedoraproject Fedora.
How do I fix CVE-2019-19118?
Upgrade django to a fixed version for your release line: 2.1.15 or 2.2.8.
Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.
Is CVE-2019-19118 being exploited?
There is no known exploitation of CVE-2019-19118 in the wild and no public exploit code.
Other vulnerabilities in Djangoproject Django
- CVE-2026-4277 Privilege abuse in GenericInlineModelAdmin
- CVE-2024-53908 Django SQL injection in HasKey(lhs, rhs) on Oracle
- CVE-2024-42005 Django SQL injection vulnerability
- CVE-2023-31047 Django bypasses validation when using one form field to upload multiple files
- CVE-2022-34265 Django `Trunc()` and `Extract()` database functions vulnerable to SQL Injection
Sources
Also known as DEBIAN-CVE-2019-19118, GHSA-hvmf-r92r-27hr, PYSEC-2019-15.