CVE-2016-9013: Django Django User With Hardcoded Password Vulnerability

CRITICAL
Advisory Identifier: GHSA-mv8g-fhh6-6267
CVSS 9.8
CWE-798
Published
Advisory Summary

CVE-2016-9013 is a CRITICAL (CVSS 9.8) django user with hardcoded password vulnerability (CWE-798: Use of Hard-coded Credentials) affecting Django libraries in the PyPI ecosystem. The issue involves django user with hardcoded password created when running tests on oracle. Remediation is available by upgrading affected packages to version 1.10.3, 1.9.11, 1.8.16.

CVE-2016-9013 at a Glance

CVE Identifier CVE-2016-9013
GHSA Identifier GHSA-mv8g-fhh6-6267
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-798: Use of Hard-coded Credentials
Affected Product Django
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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

How to Fix CVE-2016-9013

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: 1.10.3
pip install Django>=1.10.3
Django fixed: 1.9.11
pip install Django>=1.9.11
Django fixed: 1.8.16
pip install Django>=1.8.16
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-2016-9013, 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 1.10.3), 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-798: Use of Hard-coded Credentials, where the product contains hard-coded credentials, such as a password or cryptographic key. 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

Django 1.8.x before 1.8.16, 1.9.x before 1.9.11, and 1.10.x before 1.10.3 use a hardcoded password for a temporary database user created when running tests with an Oracle database, which makes it easier for remote attackers to obtain access to the database server by leveraging failure to manually specify a password in the database settings TEST dictionary.

CVE-2016-9013 Affected Django Versions

3 component(s)
Fixed Versions:
1.10.31.9.111.8.16
Product / Package Ecosystem Affected Versions Fixed Version
Django
PyPI
≥ 1.10a1
< 1.10.3
1.10.3
Django
PyPI
≥ 1.9a1
< 1.9.11
1.9.11
Django
PyPI
≥ 1.8a1
< 1.8.16
1.8.16

References

Frequently Asked Questions

What is CVE-2016-9013?
CVE-2016-9013 is a security vulnerability in Django involving Django user with hardcoded password created when running tests on Oracle under CWE-798: Use of Hard-coded Credentials.
Which Django versions are affected?
Affected versions include releases prior to 1.10.3, 1.9.11, 1.8.16 across affected packages: Django.
What version fixes CVE-2016-9013?
Upgrading to 1.10.3, 1.9.11, 1.8.16 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Django affected?
Yes, Django is affected in releases prior to 1.10.3, 1.9.11, 1.8.16. Upgrade your dependency to 1.10.3, 1.9.11, 1.8.16 or later.
What is the CVSS score of CVE-2016-9013?
CVE-2016-9013 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2016-9013?
CVE-2016-9013 is classified under CWE-798: Use of Hard-coded Credentials (The product contains hard-coded credentials, such as a password or cryptographic key.).
How can I check PyPI dependencies for CVE-2016-9013?
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-mv8g-fhh6-6267",
  "modified" : "2024-09-18T15:59:29Z",
  "published" : "2022-05-17T00:27:18Z",
  "aliases" : [ "CVE-2016-9013" ],
  "summary" : "Django user with hardcoded password created when running tests on Oracle",
  "details" : "Django 1.8.x before 1.8.16, 1.9.x before 1.9.11, and 1.10.x before 1.10.3 use a hardcoded password for a temporary database user created when running tests with an Oracle database, which makes it easier for remote attackers to obtain access to the database server by leveraging failure to manually specify a password in the database settings TEST dictionary.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.10a1"
      }, {
        "fixed" : "1.10.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.9a1"
      }, {
        "fixed" : "1.9.11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.8a1"
      }, {
        "fixed" : "1.8.16"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-9013"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/34e10720d81b8d407aa14d763b6a7fe8f13b4f2e"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/4844d86c7728c1a5a3bbce4ad336a8d32304072b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/70f99952965a430daf69eeb9947079aae535d2d0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/django/django"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2016-17.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OG5ROMUPS6C7BXELD3TAUUH7OBYV56WQ"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QXDKJYHN74BWY3P7AR2UZDVJREQMRE6S"
  }, {
    "type" : "WEB",
    "url" : "https://www.djangoproject.com/weblog/2016/nov/01/security-releases"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2017/dsa-3835"
  }, {
    "type" : "WEB",
    "url" : "http://www.ubuntu.com/usn/USN-3115-1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-798" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-22T22:58:32Z",
    "nvd_published_at" : "2016-12-09T20:59:00Z"
  }
}