CVE-2015-8213: Django Django Settings Leak Vulnerability

MODERATE
Advisory Identifier: GHSA-6wcr-wcqm-3mfh
CVSS 2.8
CWE-200
Published
Advisory Summary

CVE-2015-8213 is a MODERATE (CVSS 2.8) django settings leak vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Django libraries in the PyPI ecosystem. The issue involves django settings leak in date template filter. Remediation is available by upgrading affected packages to version 1.7.11, 1.8.7, 1.9rc2.

CVE-2015-8213 at a Glance

CVE Identifier CVE-2015-8213
GHSA Identifier GHSA-6wcr-wcqm-3mfh
Severity MODERATE
CVSS v3.1 Base Score 2.8
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Django
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 2.8

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

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

How to Fix CVE-2015-8213

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.7.11
pip install Django>=1.7.11
Django fixed: 1.8.7
pip install Django>=1.8.7
Django fixed: 1.9rc2
pip install Django>=1.9rc2
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-2015-8213, 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.7.11), 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-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. 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

The get_format function in `utils/formats.py` in Django before 1.7.x before 1.7.11, 1.8.x before 1.8.7, and 1.9.x before 1.9rc2 might allow remote attackers to obtain sensitive application secrets via a settings key in place of a date/time format setting, as demonstrated by `SECRET_KEY`.

CVE-2015-8213 Affected Django Versions

3 component(s)
Fixed Versions:
1.7.111.8.71.9rc2
Product / Package Ecosystem Affected Versions Fixed Version
Django
PyPI
≥ 1.7
< 1.7.11
1.7.11
Django
PyPI
≥ 1.8a1
< 1.8.7
1.8.7
Django
PyPI
≥ 1.9a1
< 1.9rc2
1.9rc2

References

NVD — CVE-2015-8213 NVD
https://nvd.nist.gov/vuln/detail/CVE-2015-8213
Security Fix Commit FIX COMMIT
https://github.com/django/django/commit/316bc3fc9437c5960c24baceb93c73f1939711e4
Security Fix Commit FIX COMMIT
https://github.com/django/django/commit/3ebbda0aef9e7a90ac6208bb8f9bc21228e2c7da
Security Fix Commit FIX COMMIT
https://github.com/django/django/commit/8a01c6b53169ee079cb21ac5919fdafcc8c5e172
Security Fix Commit FIX COMMIT
https://github.com/django/django/commit/9f83fc2f66f5a0bac7c291aec55df66050bb6991
Django Source Repository REPOSITORY
https://github.com/django/django
Django Source Repository REPOSITORY
https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2015-11.yaml
Django Release RELEASE
https://www.djangoproject.com/weblog/2015/nov/24/security-releases-issued
lists.fedoraproject.org/pipermail/package-a... WEB
http://lists.fedoraproject.org/pipermail/package-announce/2015-December/173375.html
lists.fedoraproject.org/pipermail/package-a... WEB
http://lists.fedoraproject.org/pipermail/package-announce/2015-December/174770.html
lists.opensuse.org/opensuse-updates/20... WEB
http://lists.opensuse.org/opensuse-updates/2015-12/msg00014.html
lists.opensuse.org/opensuse-updates/20... WEB
http://lists.opensuse.org/opensuse-updates/2015-12/msg00017.html
rhn.redhat.com/errata/rhsa-2016-01... WEB
http://rhn.redhat.com/errata/RHSA-2016-0129.html
rhn.redhat.com/errata/rhsa-2016-01... WEB
http://rhn.redhat.com/errata/RHSA-2016-0156.html
rhn.redhat.com/errata/rhsa-2016-01... WEB
http://rhn.redhat.com/errata/RHSA-2016-0157.html
rhn.redhat.com/errata/rhsa-2016-01... WEB
http://rhn.redhat.com/errata/RHSA-2016-0158.html
Django Security Information SECURITY
http://www.debian.org/security/2015/dsa-3404
Django Security Information SECURITY
http://www.securityfocus.com/bid/77750
Django Security Information SECURITY
http://www.securitytracker.com/id/1034237
www.ubuntu.com/usn/usn-2816-1 WEB
http://www.ubuntu.com/usn/USN-2816-1

Frequently Asked Questions

What is CVE-2015-8213?
CVE-2015-8213 is a security vulnerability in Django involving Django settings leak in date template filter under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Django versions are affected?
Affected versions include releases prior to 1.7.11, 1.8.7, 1.9rc2 across affected packages: Django.
What version fixes CVE-2015-8213?
Upgrading to 1.7.11, 1.8.7, 1.9rc2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Django affected?
Yes, Django is affected in releases prior to 1.7.11, 1.8.7, 1.9rc2. Upgrade your dependency to 1.7.11, 1.8.7, 1.9rc2 or later.
What is the CVSS score of CVE-2015-8213?
CVE-2015-8213 has a CVSS v3.1 base score of 2.8 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2015-8213?
CVE-2015-8213 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check PyPI dependencies for CVE-2015-8213?
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-6wcr-wcqm-3mfh",
  "modified" : "2024-09-18T14:37:17Z",
  "published" : "2022-05-17T03:25:24Z",
  "aliases" : [ "CVE-2015-8213" ],
  "summary" : "Django settings leak in date template filter",
  "details" : "The get_format function in `utils/formats.py` in Django before 1.7.x before 1.7.11, 1.8.x before 1.8.7, and 1.9.x before 1.9rc2 might allow remote attackers to obtain sensitive application secrets via a settings key in place of a date/time format setting, as demonstrated by `SECRET_KEY`.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.7"
      }, {
        "fixed" : "1.7.11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.8a1"
      }, {
        "fixed" : "1.8.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.9a1"
      }, {
        "fixed" : "1.9rc2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-8213"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/316bc3fc9437c5960c24baceb93c73f1939711e4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/3ebbda0aef9e7a90ac6208bb8f9bc21228e2c7da"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/8a01c6b53169ee079cb21ac5919fdafcc8c5e172"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/9f83fc2f66f5a0bac7c291aec55df66050bb6991"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/django/django"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2015-11.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://www.djangoproject.com/weblog/2015/nov/24/security-releases-issued"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2015-December/173375.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2015-December/174770.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2015-12/msg00014.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2015-12/msg00017.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2016-0129.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2016-0156.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2016-0157.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2016-0158.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2015/dsa-3404"
  }, {
    "type" : "WEB",
    "url" : "http://www.securityfocus.com/bid/77750"
  }, {
    "type" : "WEB",
    "url" : "http://www.securitytracker.com/id/1034237"
  }, {
    "type" : "WEB",
    "url" : "http://www.ubuntu.com/usn/USN-2816-1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-03-08T20:49:45Z",
    "nvd_published_at" : "2015-12-07T20:59:00Z"
  }
}