CVE-2019-19118 Django allows unintended model editing

Medium 6.5 Published Updated

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.

PackageAffectedFixed in
django PyPIFrom 2.12.1.15, 2.2.8
django PyPIFrom 2.12.1.15
django PyPIFrom 2.22.2.8
Django PyPIFrom 2.12.1.15
Django PyPIFrom 2.22.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.

All Djangoproject Django vulnerabilities

Sources

Also known as DEBIAN-CVE-2019-19118, GHSA-hvmf-r92r-27hr, PYSEC-2019-15.

Is CVE-2019-19118 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free