CVE-2015-0221: Django Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-jhjg-w2cp-5j44
CVSS 7.5
CWE-400
Published
Advisory Summary

CVE-2015-0221 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Django libraries in the PyPI ecosystem. The issue involves django dos in django.views.static.serve. Remediation is available by upgrading affected packages to version 1.4.18, 1.6.10, 1.7.3.

CVE-2015-0221 at a Glance

CVE Identifier CVE-2015-0221
GHSA Identifier GHSA-jhjg-w2cp-5j44
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
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-0221

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.4.18
pip install Django>=1.4.18
Django fixed: 1.6.10
pip install Django>=1.6.10
Django fixed: 1.7.3
pip install Django>=1.7.3
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-0221, 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.4.18), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. 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 `django.views.static.serve` view in Django before 1.4.18, 1.6.x before 1.6.10, and 1.7.x before 1.7.3 reads files an entire line at a time, which allows remote attackers to cause a denial of service (memory consumption) via a long line in a file.

CVE-2015-0221 Affected Django Versions

3 component(s)
Fixed Versions:
1.4.181.6.101.7.3
Product / Package Ecosystem Affected Versions Fixed Version
Django
PyPI
< 1.4.18
1.4.18
Django
PyPI
≥ 1.6
< 1.6.10
1.6.10
Django
PyPI
≥ 1.7
< 1.7.3
1.7.3

References

NVD — CVE-2015-0221 NVD
https://nvd.nist.gov/vuln/detail/CVE-2015-0221
Security Fix Commit FIX COMMIT
https://github.com/django/django/commit/553779c4055e8742cc832ed525b9ee34b174934f
Security Fix Commit FIX COMMIT
https://github.com/django/django/commit/818e59a3f0fbadf6c447754d202d88df025f8f2a
Security Fix Commit FIX COMMIT
https://github.com/django/django/commit/d020da6646c5142bc092247d218a3d1ce3e993f7
Django Source Repository REPOSITORY
https://github.com/django/django
Django Release RELEASE
https://github.com/django/django/blob/9b9c805cedb08621bd5dc58a01a6478eb7cc49a9/docs/releases/1.4.18.txt#L48C1-L49C1
Django Source Repository REPOSITORY
https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2015-6.yaml
web.archive.org/web/20150128111656/... WEB
https://web.archive.org/web/20150128111656/http://secunia.com/advisories/62285
web.archive.org/web/20150128111656/... WEB
https://web.archive.org/web/20150128111656/http://secunia.com/advisories/62309
Django Security Information SECURITY
https://web.archive.org/web/20150523054951/http://www.mandriva.com/en/support/security/advisories/advisory/MDVSA-2015:109/?name=MDVSA-2015:109
Django Security Information SECURITY
https://web.archive.org/web/20150523054953/http://www.mandriva.com/en/support/security/advisories/advisory/MDVSA-2015:036/?name=MDVSA-2015:036
web.archive.org/web/20151104201446/... WEB
https://web.archive.org/web/20151104201446/http://secunia.com/advisories/62718
Django Security Information SECURITY
https://www.djangoproject.com/weblog/2015/jan/13/security
advisories.mageia.org/mgasa-2015-0026.htm... WEB
http://advisories.mageia.org/MGASA-2015-0026.html
lists.fedoraproject.org/pipermail/package-a... WEB
http://lists.fedoraproject.org/pipermail/package-announce/2015-January/148485.html
lists.fedoraproject.org/pipermail/package-a... WEB
http://lists.fedoraproject.org/pipermail/package-announce/2015-January/148608.html
lists.fedoraproject.org/pipermail/package-a... WEB
http://lists.fedoraproject.org/pipermail/package-announce/2015-January/148696.html
lists.opensuse.org/opensuse-updates/20... WEB
http://lists.opensuse.org/opensuse-updates/2015-04/msg00001.html
lists.opensuse.org/opensuse-updates/20... WEB
http://lists.opensuse.org/opensuse-updates/2015-09/msg00035.html
ubuntu.com/usn/usn-2469-1 WEB
http://ubuntu.com/usn/usn-2469-1

Frequently Asked Questions

What is CVE-2015-0221?
CVE-2015-0221 is a security vulnerability in Django involving Django DoS in django.views.static.serve under CWE-400: Uncontrolled Resource Consumption.
Which Django versions are affected?
Affected versions include releases prior to 1.4.18, 1.6.10, 1.7.3 across affected packages: Django.
What version fixes CVE-2015-0221?
Upgrading to 1.4.18, 1.6.10, 1.7.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Django affected?
Yes, Django is affected in releases prior to 1.4.18, 1.6.10, 1.7.3. Upgrade your dependency to 1.4.18, 1.6.10, 1.7.3 or later.
What is the CVSS score of CVE-2015-0221?
CVE-2015-0221 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-0221?
CVE-2015-0221 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check PyPI dependencies for CVE-2015-0221?
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-jhjg-w2cp-5j44",
  "modified" : "2024-09-18T19:53:58Z",
  "published" : "2022-05-17T03:20:50Z",
  "aliases" : [ "CVE-2015-0221" ],
  "summary" : "Django DoS in django.views.static.serve",
  "details" : "The `django.views.static.serve` view in Django before 1.4.18, 1.6.x before 1.6.10, and 1.7.x before 1.7.3 reads files an entire line at a time, which allows remote attackers to cause a denial of service (memory consumption) via a long line in a file.",
  "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" : "0"
      }, {
        "fixed" : "1.4.18"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.6"
      }, {
        "fixed" : "1.6.10"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.7"
      }, {
        "fixed" : "1.7.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-0221"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/553779c4055e8742cc832ed525b9ee34b174934f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/818e59a3f0fbadf6c447754d202d88df025f8f2a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/d020da6646c5142bc092247d218a3d1ce3e993f7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/blob/9b9c805cedb08621bd5dc58a01a6478eb7cc49a9/docs/releases/1.4.18.txt#L48C1-L49C1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2015-6.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20150128111656/http://secunia.com/advisories/62285"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20150128111656/http://secunia.com/advisories/62309"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20150523054951/http://www.mandriva.com/en/support/security/advisories/advisory/MDVSA-2015:109/?name=MDVSA-2015:109"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20150523054953/http://www.mandriva.com/en/support/security/advisories/advisory/MDVSA-2015:036/?name=MDVSA-2015:036"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20151104201446/http://secunia.com/advisories/62718"
  }, {
    "type" : "WEB",
    "url" : "https://www.djangoproject.com/weblog/2015/jan/13/security"
  }, {
    "type" : "WEB",
    "url" : "http://advisories.mageia.org/MGASA-2015-0026.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2015-January/148485.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2015-January/148608.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2015-January/148696.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2015-04/msg00001.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2015-09/msg00035.html"
  }, {
    "type" : "WEB",
    "url" : "http://ubuntu.com/usn/usn-2469-1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-08-03T19:57:13Z",
    "nvd_published_at" : "2015-01-16T16:59:00Z"
  }
}