CVE-2007-5712: Django Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-9v8h-57gv-qch6
CVSS 5.9
CWE-400
Published
Advisory Summary

CVE-2007-5712 is a HIGH (CVSS 5.9) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Django libraries in the PyPI ecosystem. The issue involves django vulnerable to denial of service via i18n middleware component. Remediation is available by upgrading affected packages to version 0.96.1, 0.95.2, 0.91.1.

CVE-2007-5712 at a Glance

CVE Identifier CVE-2007-5712
GHSA Identifier GHSA-9v8h-57gv-qch6
Severity HIGH
CVSS v3.1 Base Score 5.9
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Django
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.9

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

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
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-2007-5712

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: 0.96.1
pip install Django>=0.96.1
Django fixed: 0.95.2
pip install Django>=0.95.2
Django fixed: 0.91.1
pip install Django>=0.91.1
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-2007-5712, 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 0.96.1), 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 internationalization (i18n) framework in Django 0.91, 0.95, 0.95.1, and 0.96, and as used in other products such as PyLucid, when the USE_I18N option and the i18n component are enabled, allows remote attackers to cause a denial of service (memory consumption) via many HTTP requests with large Accept-Language headers.

CVE-2007-5712 Affected Django Versions

3 component(s)
Fixed Versions:
0.96.10.95.20.91.1
Product / Package Ecosystem Affected Versions Fixed Version
Django
PyPI
≥ 0.96.0
< 0.96.1
All 1 versions
0.96.0
0.96.1
Django
PyPI
≥ 0.95
< 0.95.2
0.95.2
Django
PyPI
≥ 0.91.0
< 0.91.1
All 1 versions
0.91.0
0.91.1

References

NVD — CVE-2007-5712 NVD
https://nvd.nist.gov/vuln/detail/CVE-2007-5712
Security Fix Commit FIX COMMIT
https://github.com/django/django/commit/412ed22502e11c50dbfee854627594f0e7e2c234
Security Fix Commit FIX COMMIT
https://github.com/django/django/commit/7dd2dd08a79e388732ce00e2b5514f15bd6d0f6f
Security Fix Commit FIX COMMIT
https://github.com/django/django/commit/8bc36e726c9e8c75c681d3ad232df8e882aaac81
exchange.xforce.ibmcloud.com/vulnerabilities/381... WEB
https://exchange.xforce.ibmcloud.com/vulnerabilities/38143
Django Source Repository REPOSITORY
https://github.com/django/django
Django Source Repository REPOSITORY
https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2007-1.yaml
web.archive.org/web/20091201070224/... WEB
https://web.archive.org/web/20091201070224/http://secunia.com/advisories/27435
web.archive.org/web/20111224195100/... WEB
https://web.archive.org/web/20111224195100/http://secunia.com/advisories/27597
web.archive.org/web/20111229085535/... WEB
https://web.archive.org/web/20111229085535/http://secunia.com/advisories/31961
Django Security Information SECURITY
https://web.archive.org/web/20200228183657/http://www.securityfocus.com/bid/26227
www.redhat.com/archives/fedora-pac... WEB
https://www.redhat.com/archives/fedora-package-announce/2007-November/msg00243.html
www.redhat.com/archives/fedora-pac... WEB
https://www.redhat.com/archives/fedora-package-announce/2007-November/msg00257.html
sourceforge.net/forum/forum.php WEB
http://sourceforge.net/forum/forum.php?forum_id=749199
Django Security Information SECURITY
http://www.debian.org/security/2008/dsa-1640
Django Security Information SECURITY
http://www.djangoproject.com/weblog/2007/oct/26/security-fix

Frequently Asked Questions

What is CVE-2007-5712?
CVE-2007-5712 is a security vulnerability in Django involving Django vulnerable to Denial of Service via i18n middleware component under CWE-400: Uncontrolled Resource Consumption.
Which Django versions are affected?
Affected versions include releases prior to 0.96.1, 0.95.2, 0.91.1 across affected packages: Django.
What version fixes CVE-2007-5712?
Upgrading to 0.96.1, 0.95.2, 0.91.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Django affected?
Yes, Django is affected in releases prior to 0.96.1, 0.95.2, 0.91.1. Upgrade your dependency to 0.96.1, 0.95.2, 0.91.1 or later.
What is the CVSS score of CVE-2007-5712?
CVE-2007-5712 has a CVSS v3.1 base score of 5.9 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2007-5712?
CVE-2007-5712 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-2007-5712?
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-9v8h-57gv-qch6",
  "modified" : "2024-11-18T16:26:20Z",
  "published" : "2022-05-01T18:36:08Z",
  "aliases" : [ "CVE-2007-5712" ],
  "summary" : "Django vulnerable to Denial of Service via i18n middleware component",
  "details" : "The internationalization (i18n) framework in Django 0.91, 0.95, 0.95.1, and 0.96, and as used in other products such as PyLucid, when the USE_I18N option and the i18n component are enabled, allows remote attackers to cause a denial of service (memory consumption) via many HTTP requests with large Accept-Language headers.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/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.96.0"
      }, {
        "fixed" : "0.96.1"
      } ]
    } ],
    "versions" : [ "0.96.0" ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.95"
      }, {
        "fixed" : "0.95.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.91.0"
      }, {
        "fixed" : "0.91.1"
      } ]
    } ],
    "versions" : [ "0.91.0" ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2007-5712"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/412ed22502e11c50dbfee854627594f0e7e2c234"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/7dd2dd08a79e388732ce00e2b5514f15bd6d0f6f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/8bc36e726c9e8c75c681d3ad232df8e882aaac81"
  }, {
    "type" : "WEB",
    "url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/38143"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/django/django"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2007-1.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20091201070224/http://secunia.com/advisories/27435"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20111224195100/http://secunia.com/advisories/27597"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20111229085535/http://secunia.com/advisories/31961"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200228183657/http://www.securityfocus.com/bid/26227"
  }, {
    "type" : "WEB",
    "url" : "https://www.redhat.com/archives/fedora-package-announce/2007-November/msg00243.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.redhat.com/archives/fedora-package-announce/2007-November/msg00257.html"
  }, {
    "type" : "WEB",
    "url" : "http://sourceforge.net/forum/forum.php?forum_id=749199"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2008/dsa-1640"
  }, {
    "type" : "WEB",
    "url" : "http://www.djangoproject.com/weblog/2007/oct/26/security-fix"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-29T14:37:50Z",
    "nvd_published_at" : "2007-10-30T19:46:00Z"
  }
}