CVE-2015-2296: Requests Python Requests Session Fixation Vulnerability
MODERATECVE-2015-2296 is a MODERATE python requests session fixation vulnerability (General Security Weakness) affecting Requests libraries in the PyPI ecosystem. The issue involves python requests session fixation. Remediation is available by upgrading affected packages to version 2.6.0.
CVE-2015-2296 at a Glance
How to Fix CVE-2015-2296
To remediate this vulnerability, upgrade all affected Requests 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 requests>=2.6.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show requests
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2015-2296, inspect your installed packages using pip:
pip show requests
Analyze the terminal output to locate any version of Requests in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.6.0), your application is affected.
Note: The pip show requests command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Requests, 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-2296 Affected Requests Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
requests
|
PyPI |
≥ 2.1.0
< 2.6.0
|
2.6.0
|
References
Frequently Asked Questions
What is CVE-2015-2296?
Which Requests versions are affected?
What version fixes CVE-2015-2296?
Is requests affected?
What CWE is associated with CVE-2015-2296?
How can I check PyPI dependencies for CVE-2015-2296?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pg2w-x9wp-vw92",
"modified" : "2024-10-21T21:03:10Z",
"published" : "2022-05-13T01:11:23Z",
"aliases" : [ "CVE-2015-2296" ],
"summary" : "Python Requests Session Fixation",
"details" : "The `resolve_redirects` function in sessions.py in requests 2.1.0 through 2.5.3 allows remote attackers to conduct session fixation attacks via a cookie without a host value in a redirect.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "requests"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.1.0"
}, {
"fixed" : "2.6.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-2296"
}, {
"type" : "WEB",
"url" : "https://github.com/kennethreitz/requests/commit/3bd8afbff29e50b38f889b2f688785a669b9aafc"
}, {
"type" : "WEB",
"url" : "https://github.com/psf/requests/commit/3bd8afbff29e50b38f889b2f688785a669b9aafc"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/psf/requests"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/requests/PYSEC-2015-17.yaml"
}, {
"type" : "WEB",
"url" : "https://warehouse.python.org/project/requests/2.6.0"
}, {
"type" : "WEB",
"url" : "http://advisories.mageia.org/MGASA-2015-0120.html"
}, {
"type" : "WEB",
"url" : "http://lists.fedoraproject.org/pipermail/package-announce/2015-March/153594.html"
}, {
"type" : "WEB",
"url" : "http://www.mandriva.com/security/advisories?name=MDVSA-2015:133"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2015/03/14/4"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2015/03/15/1"
}, {
"type" : "WEB",
"url" : "http://www.ubuntu.com/usn/USN-2531-1"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-31T23:49:22Z",
"nvd_published_at" : "2015-03-18T16:59:00Z"
}
}