CVE-2015-2316: Django Django Denial-of-service Possibility With Strip_tags Vulnerability

HIGH
Advisory Identifier: GHSA-j3j3-jrfh-cm2w
CVSS 7.5
CWE-770
Published
Advisory Summary

CVE-2015-2316 is a HIGH (CVSS 7.5) django denial-of-service possibility with strip_tags vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Django libraries in the PyPI ecosystem. The issue involves django denial-of-service possibility with strip_tags. Remediation is available by upgrading affected packages to version 1.6.11, 1.7.7, 1.8c1.

CVE-2015-2316 at a Glance

CVE Identifier CVE-2015-2316
GHSA Identifier GHSA-j3j3-jrfh-cm2w
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product Django
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/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 None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2015-2316

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.6.11
pip install Django>=1.6.11
Django fixed: 1.7.7
pip install Django>=1.7.7
Django fixed: 1.8c1
pip install Django>=1.8c1
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-2316, 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.6.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-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. 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 `utils.html.strip_tags` function in Django 1.6.x before 1.6.11, 1.7.x before 1.7.7, and 1.8.x before 1.8c1, when using certain versions of Python, allows remote attackers to cause a denial of service (infinite loop) by increasing the length of the input string.

CVE-2015-2316 Affected Django Versions

3 component(s)
Fixed Versions:
1.6.111.7.71.8c1
Product / Package Ecosystem Affected Versions Fixed Version
Django
PyPI
≥ 1.6
< 1.6.11
1.6.11
Django
PyPI
≥ 1.7
< 1.7.7
1.7.7
Django
PyPI
≥ 1.8a1
< 1.8c1
1.8c1

References

Frequently Asked Questions

What is CVE-2015-2316?
CVE-2015-2316 is a security vulnerability in Django involving Django Denial-of-service possibility with strip_tags under CWE-770: Allocation of Resources Without Limits or Throttling.
Which Django versions are affected?
Affected versions include releases prior to 1.6.11, 1.7.7, 1.8c1 across affected packages: Django.
What version fixes CVE-2015-2316?
Upgrading to 1.6.11, 1.7.7, 1.8c1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Django affected?
Yes, Django is affected in releases prior to 1.6.11, 1.7.7, 1.8c1. Upgrade your dependency to 1.6.11, 1.7.7, 1.8c1 or later.
What is the CVSS score of CVE-2015-2316?
CVE-2015-2316 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2015-2316?
CVE-2015-2316 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check PyPI dependencies for CVE-2015-2316?
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-j3j3-jrfh-cm2w",
  "modified" : "2024-09-18T16:03:03Z",
  "published" : "2022-05-14T02:06:52Z",
  "aliases" : [ "CVE-2015-2316" ],
  "summary" : "Django Denial-of-service possibility with strip_tags",
  "details" : "The `utils.html.strip_tags` function in Django 1.6.x before 1.6.11, 1.7.x before 1.7.7, and 1.8.x before 1.8c1, when using certain versions of Python, allows remote attackers to cause a denial of service (infinite loop) by increasing the length of the input string.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.6"
      }, {
        "fixed" : "1.6.11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.7"
      }, {
        "fixed" : "1.7.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.8a1"
      }, {
        "fixed" : "1.8c1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-2316"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/5447709a571cd5d95971f1d5d21d4a7edcf85bbd"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/b6b3cb9899214a23ebb0f4ebf0e0b300b0ee524f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/e63363f8e075fa8d66326ad6a1cc3391cc95cd97"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/django/django"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2015-18.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200229033201/http://www.securityfocus.com/bid/73322"
  }, {
    "type" : "WEB",
    "url" : "https://www.djangoproject.com/weblog/2015/mar/18/security-releases"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2015-April/155421.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2015-04/msg00001.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.oracle.com/technetwork/topics/security/bulletinapr2015-2511959.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.ubuntu.com/usn/USN-2539-1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-29T11:21:09Z",
    "nvd_published_at" : "2015-03-25T14:59:00Z"
  }
}