CVE-2015-3982: Django Django Allows User Sessions Hijacking Vulnerability
MODERATECVE-2015-3982 is a MODERATE (CVSS 7.5) django allows user sessions hijacking vulnerability (CWE-384: Session Fixation) affecting Django libraries in the PyPI ecosystem. The issue involves django allows user sessions hijacking via an empty string in the session key. Remediation is available by upgrading affected packages to version 1.8.2.
CVE-2015-3982 at a Glance
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).
How to Fix CVE-2015-3982
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.
pip install Django>=1.8.2
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-3982, 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.8.2), 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-384: Session Fixation, where authenticating a user, or otherwise establishing a new user session, without invalidating any existing session identifier gives an attacker the opportunity to steal authenticated sessions. 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
CVE-2015-3982 Affected Django Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Django
|
PyPI |
≥ 1.8a1
< 1.8.2
|
1.8.2
|
References
Frequently Asked Questions
What is CVE-2015-3982?
Which Django versions are affected?
What version fixes CVE-2015-3982?
Is Django affected?
What is the CVSS score of CVE-2015-3982?
What CWE is associated with CVE-2015-3982?
How can I check PyPI dependencies for CVE-2015-3982?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6wgp-fwfm-mxp3",
"modified" : "2024-09-17T15:10:52Z",
"published" : "2022-05-17T03:29:56Z",
"aliases" : [ "CVE-2015-3982" ],
"summary" : "Django allows user sessions hijacking via an empty string in the session key",
"details" : "The session.flush function in the cached_db backend in Django 1.8.x before 1.8.2 does not properly flush the session, which allows remote attackers to hijack user sessions via an empty string in the session key.",
"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/E:U"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "Django"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.8a1"
}, {
"fixed" : "1.8.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-3982"
}, {
"type" : "WEB",
"url" : "https://github.com/django/django/commit/31cb25adecba930bdeee4556709f5a1c42d88fd6"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/django/django"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2015-19.yaml"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20200228092138/http://www.securityfocus.com/bid/74960"
}, {
"type" : "WEB",
"url" : "https://www.djangoproject.com/weblog/2015/may/20/security-release"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-384" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-29T16:20:47Z",
"nvd_published_at" : "2015-06-02T14:59:00Z"
}
}