CVE-2019-19118: Django Django Allows Unintended Model Editing Vulnerability
HIGHCVE-2019-19118 is a HIGH (CVSS 6.5) django allows unintended model editing vulnerability (CWE-276: Incorrect Default Permissions) affecting Django libraries in the PyPI ecosystem. The issue involves django allows unintended model editing. Remediation is available by upgrading affected packages to version 2.1.15, 2.2.8.
CVE-2019-19118 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2019-19118
To remediate this vulnerability, upgrade all affected Django dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install Django>=2.1.15
pip install Django>=2.2.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show Django
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2019-19118, inspect your installed packages using pip:
pip show Django
Analyze the terminal output to locate any version of Django in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.15), your application is affected.
Note: The pip show Django command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-276: Incorrect Default Permissions, where during installation, installed file permissions are set to allow anyone to modify those files. In Django, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2019-19118 Affected Django Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Django
|
PyPI |
≥ 2.1
< 2.1.15
|
2.1.15
|
|
Django
|
PyPI |
≥ 2.2
< 2.2.8
|
2.2.8
|
References
Frequently Asked Questions
What is CVE-2019-19118?
Which Django versions are affected?
What version fixes CVE-2019-19118?
Is Django affected?
What is the CVSS score of CVE-2019-19118?
What CWE is associated with CVE-2019-19118?
How can I check PyPI dependencies for CVE-2019-19118?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hvmf-r92r-27hr",
"modified" : "2024-11-18T16:26:04Z",
"published" : "2019-12-04T21:26:28Z",
"aliases" : [ "CVE-2019-19118" ],
"summary" : "Django allows unintended model editing",
"details" : "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.)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "Django"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.1"
}, {
"fixed" : "2.1.15"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "Django"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.2"
}, {
"fixed" : "2.2.8"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-19118"
}, {
"type" : "WEB",
"url" : "https://github.com/django/django/commit/103ebe2b5ff1b2614b85a52c239f471904d26244"
}, {
"type" : "WEB",
"url" : "https://github.com/django/django/commit/36f580a17f0b3cb087deadf3b65eea024f479c21"
}, {
"type" : "WEB",
"url" : "https://docs.djangoproject.com/en/dev/releases/security"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-hvmf-r92r-27hr"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/django/django"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2019-15.yaml"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/forum/#!topic/django-announce/GjGqDvtNmWQ"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6R4HD22PVEVQ45H2JA2NXH443AYJOPL5"
}, {
"type" : "WEB",
"url" : "https://security.gentoo.org/glsa/202004-17"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20191217-0003"
}, {
"type" : "WEB",
"url" : "https://www.djangoproject.com/weblog/2019/dec/02/security-releases"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2019/12/02/1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-276" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2019-12-04T19:44:26Z",
"nvd_published_at" : null
}
}