CVE-2018-16984: Django Django Allows Unprivileged Users To Vulnerability

MODERATE
Advisory Identifier: GHSA-6mx3-3vqg-hpp2
CVSS 4.9
CWE-522
Published
Advisory Summary

CVE-2018-16984 is a MODERATE (CVSS 4.9) django allows unprivileged users to vulnerability (CWE-522: Insufficiently Protected Credentials) affecting Django libraries in the PyPI ecosystem. The issue involves django allows unprivileged users to read the password hashes of arbitrary accounts. Remediation is available by upgrading affected packages to version 2.1.2.

CVE-2018-16984 at a Glance

CVE Identifier CVE-2018-16984
GHSA Identifier GHSA-6mx3-3vqg-hpp2
Severity MODERATE
CVSS v3.1 Base Score 4.9
CWE Classification CWE-522: Insufficiently Protected Credentials
Affected Product Django
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 4.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2018-16984

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.

Django fixed: 2.1.2
pip install Django>=2.1.2
Verify Direct and Transitive Dependencies

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-2018-16984, 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.2), 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-522: Insufficiently Protected Credentials, where the product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval. 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

An issue was discovered in Django 2.1 before 2.1.2, in which unprivileged users can read the password hashes of arbitrary accounts. The read-only password widget used by the Django Admin to display an obfuscated password hash was bypassed if a user has only the "view" permission (new in Django 2.1), resulting in display of the entire password hash to those users. This may result in a vulnerability for sites with legacy user accounts using insecure hashes.

CVE-2018-16984 Affected Django Versions

1 component(s)
Fixed Versions:
2.1.2
Product / Package Ecosystem Affected Versions Fixed Version
Django
PyPI
≥ 2.1
< 2.1.2
2.1.2

References

Frequently Asked Questions

What is CVE-2018-16984?
CVE-2018-16984 is a security vulnerability in Django involving Django allows unprivileged users to read the password hashes of arbitrary accounts under CWE-522: Insufficiently Protected Credentials.
Which Django versions are affected?
Affected versions include releases prior to 2.1.2 across affected packages: Django.
What version fixes CVE-2018-16984?
Upgrading to 2.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Django affected?
Yes, Django is affected in releases prior to 2.1.2. Upgrade your dependency to 2.1.2 or later.
What is the CVSS score of CVE-2018-16984?
CVE-2018-16984 has a CVSS v3.1 base score of 4.9 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2018-16984?
CVE-2018-16984 is classified under CWE-522: Insufficiently Protected Credentials (The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval.).
How can I check PyPI dependencies for CVE-2018-16984?
Run the dependency tree command: 'pip show Django'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6mx3-3vqg-hpp2",
  "modified" : "2024-09-18T18:58:21Z",
  "published" : "2018-10-03T20:07:39Z",
  "aliases" : [ "CVE-2018-16984" ],
  "summary" : "Django allows unprivileged users to read the password hashes of arbitrary accounts",
  "details" : "An issue was discovered in Django 2.1 before 2.1.2, in which unprivileged users can read the password hashes of arbitrary accounts. The read-only password widget used by the Django Admin to display an obfuscated password hash was bypassed if a user has only the \"view\" permission (new in Django 2.1), resulting in display of the entire password hash to those users. This may result in a vulnerability for sites with legacy user accounts using insecure hashes.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1"
      }, {
        "fixed" : "2.1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-16984"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/bf39978a53f117ca02e9a0c78b76664a41a54745"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-6mx3-3vqg-hpp2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/django/django"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2018-3.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20190502-0009"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200517123022/http://www.securitytracker.com/id/1041749"
  }, {
    "type" : "WEB",
    "url" : "https://www.djangoproject.com/weblog/2018/oct/01/security-release"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-522" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:19:52Z",
    "nvd_published_at" : null
  }
}