CVE-2015-2296: Requests Python Requests Session Fixation Vulnerability

MODERATE
Advisory Identifier: GHSA-pg2w-x9wp-vw92
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2015-2296
GHSA Identifier GHSA-pg2w-x9wp-vw92
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Requests
Package Ecosystem PyPI
Published Date
Last Updated

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.

requests fixed: 2.6.0
pip install requests>=2.6.0
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 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

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.

CVE-2015-2296 Affected Requests Versions

1 component(s)
Fixed Versions:
2.6.0
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?
CVE-2015-2296 is a security vulnerability in Requests involving Python Requests Session Fixation under General Security Weakness.
Which Requests versions are affected?
Affected versions include releases prior to 2.6.0 across affected packages: requests.
What version fixes CVE-2015-2296?
Upgrading to 2.6.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is requests affected?
Yes, requests is affected in releases prior to 2.6.0. Upgrade your dependency to 2.6.0 or later.
What CWE is associated with CVE-2015-2296?
CVE-2015-2296 is classified under General Security Weakness.
How can I check PyPI dependencies for CVE-2015-2296?
Run the dependency tree command: 'pip show requests'. 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-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"
  }
}