CVE-2011-4139: Django Django Vulnerable To Cache Poisoning Vulnerability

HIGH
Advisory Identifier: GHSA-rm2j-x595-q9cj
CVSS 7.5
CWE-349 CWE-20
Published
Advisory Summary

CVE-2011-4139 is a HIGH (CVSS 7.5) django vulnerable to cache poisoning vulnerability (CWE-349: Acceptance of Extraneous Untrusted Data With Trusted Data) affecting Django libraries in the PyPI ecosystem. The issue involves django vulnerable to cache poisoning. Remediation is available by upgrading affected packages to version 1.2.7, 1.3.1.

CVE-2011-4139 at a Glance

CVE Identifier CVE-2011-4139
GHSA Identifier GHSA-rm2j-x595-q9cj
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-349: Acceptance of Extraneous Untrusted Data With Trusted Data
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:H/A:N).

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 High (I:H)
Availability None (A:N)

How to Fix CVE-2011-4139

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.2.7
pip install Django>=1.2.7
Django fixed: 1.3.1
pip install Django>=1.3.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-2011-4139, 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.2.7), 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-349: Acceptance of Extraneous Untrusted Data With Trusted Data, where the product, when processing trusted data, accepts any untrusted data that is also included with the trusted data, treating the untrusted data as if it were trusted. 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 before 1.2.7 and 1.3.x before 1.3.1 uses a request's HTTP Host header to construct a full URL in certain circumstances, which allows remote attackers to conduct cache poisoning attacks via a crafted request.

CVE-2011-4139 Affected Django Versions

2 component(s)
Fixed Versions:
1.2.71.3.1
Product / Package Ecosystem Affected Versions Fixed Version
Django
PyPI
< 1.2.7
1.2.7
Django
PyPI
≥ 1.3
< 1.3.1
1.3.1

References

Frequently Asked Questions

What is CVE-2011-4139?
CVE-2011-4139 is a security vulnerability in Django involving Django Vulnerable to Cache Poisoning under CWE-349: Acceptance of Extraneous Untrusted Data With Trusted Data.
Which Django versions are affected?
Affected versions include releases prior to 1.2.7, 1.3.1 across affected packages: Django.
What version fixes CVE-2011-4139?
Upgrading to 1.2.7, 1.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Django affected?
Yes, Django is affected in releases prior to 1.2.7, 1.3.1. Upgrade your dependency to 1.2.7, 1.3.1 or later.
What is the CVSS score of CVE-2011-4139?
CVE-2011-4139 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:H/A:N.
What CWE is associated with CVE-2011-4139?
CVE-2011-4139 is classified under CWE-349: Acceptance of Extraneous Untrusted Data With Trusted Data (The product, when processing trusted data, accepts any untrusted data that is also included with the trusted data, treating the untrusted data as if it were trusted.).
How can I check PyPI dependencies for CVE-2011-4139?
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-rm2j-x595-q9cj",
  "modified" : "2024-09-16T22:35:46Z",
  "published" : "2022-05-14T03:49:36Z",
  "aliases" : [ "CVE-2011-4139" ],
  "summary" : "Django Vulnerable to Cache Poisoning",
  "details" : "Django before 1.2.7 and 1.3.x before 1.3.1 uses a request's HTTP Host header to construct a full URL in certain circumstances, which allows remote attackers to conduct cache poisoning attacks via a crafted request.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.3"
      }, {
        "fixed" : "1.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2011-4139"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/2f7fadc38efa58ac0a8f93f936b82332a199f396"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/c613af4d6485586c79d692b70a9acac429f3ca9d"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=737366"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/django/django"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2011-4.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://hermes.opensuse.org/messages/14700881"
  }, {
    "type" : "WEB",
    "url" : "https://www.djangoproject.com/weblog/2011/sep/09"
  }, {
    "type" : "WEB",
    "url" : "https://www.djangoproject.com/weblog/2011/sep/10/127"
  }, {
    "type" : "WEB",
    "url" : "http://openwall.com/lists/oss-security/2011/09/11/1"
  }, {
    "type" : "WEB",
    "url" : "http://openwall.com/lists/oss-security/2011/09/13/2"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2011/dsa-2332"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20", "CWE-349" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-16T22:47:59Z",
    "nvd_published_at" : "2011-10-19T10:55:00Z"
  }
}