CVE-2015-2296
NoneCVSS
—
EPSS
3.4%
Published
Mar 18, 2015
CISA due date
—
Cloudanix analysis
A flaw in a widely used Python tool for handling web requests could let attackers steal or reuse login sessions when users are sent from one site to another.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Moderate
- Impact
- Privilege Gain
- Component
- Library
- Class
- Authentication Bypass
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The resolve_redirects function in requests sessions.py permits a redirect response to inject a cookie lacking a host value, allowing the attacker-supplied session identifier to be accepted and reused across domains.
Why it matters to the business
Organizations still running unpatched versions of the requests library face risk of session takeover, resulting in unauthorized access to user accounts and potential data exposure; the vulnerability is more than a decade old with no known active exploitation campaigns.
How an attack unfolds
An attacker crafts a redirect that returns a Set-Cookie header without a domain attribute, causes the victim application to follow the redirect using the vulnerable requests library, and thereby forces the victim's browser or client to adopt the attacker's session identifier for subsequent requests.
How to fix it
Upgrade the Python requests package to a version newer than 2.5.3 on all affected systems including Mageia and Ubuntu; verify the installed version with pip show requests and replace any direct or transitive dependency on the vulnerable range.
How to confirm the fix worked
Inventory all Python environments for requests versions 2.1.0-2.5.3, confirm upgrade via package manager output, and re-test redirect handling in applications that use sessions.py to ensure cookies now carry proper host attributes.
Typical attack path
- Attacker prepares a malicious redirect endpoint returning a cookie without host restriction
- Victim application issues a request that follows the redirect via the vulnerable requests library
- The injected cookie is stored and reused in the established session
- Attacker uses the fixed session identifier to impersonate the victim
How to detect it
Examine application and proxy logs for redirect responses containing Set-Cookie headers that lack domain or host attributes; correlate with subsequent requests using the same session identifier from unexpected sources.
What your security team should do
- Immediately scan codebases and container images for the vulnerable requests versions and prioritize upgrades
- Add package version checks to CI/CD pipelines to block future inclusion of requests <= 2.5.3
- Review session management code that follows redirects and enforce strict cookie domain validation as a defense-in-depth measure
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| PyPI | requests | 0 | 3bd8afbff29e50b38f889b2f688785a669b9aafc |
| PyPI | requests | 2.1.0 | 2.6.0 |
| Debian:11 | requests | 0 | 2.4.3-6 |
| Debian:12 | requests | 0 | 2.4.3-6 |
| Debian:13 | requests | 0 | 2.4.3-6 |
| Mageia:4 | python-requests | 0 | 2.3.0-1.2.mga4 |
| SUSE:Cloud Compute Node for SUSE Linux Enterprise 12 5 | python-requests | 0 | 2.8.1-6.9.1 |
| SUSE:Enterprise Storage 1.0 | python-requests | 0 | 2.8.1-6.9.1 |
| SUSE:Enterprise Storage 2 | python-requests | 0 | 2.8.1-6.9.1 |
| SUSE:Enterprise Storage 5 | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:Enterprise Storage 5 | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:Enterprise Storage 5 | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:Enterprise Storage 5 | python3-requests | 0 | 2.20.1-5.2 |
| SUSE:HPE Helion OpenStack 8 | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:HPE Helion OpenStack 8 | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:HPE Helion OpenStack 8 | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:HPE Helion OpenStack 8 | python3-requests | 0 | 2.20.1-5.2 |
| SUSE:Linux Enterprise Desktop 12 SP1 | python-requests | 0 | 2.8.1-6.9.1 |
| SUSE:Linux Enterprise Desktop 12 SP4 | python-ply | 0 | 3.4-3.3.1 |
| SUSE:Linux Enterprise High Availability Extension 12 | python-requests | 0 | 2.8.1-6.9.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP3 | python39-pip | 0 | 20.2.4-7.5.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP3 | python39-setuptools | 0 | 44.1.1-7.3.1 |
| SUSE:Linux Enterprise Module for Public Cloud 12 | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:Linux Enterprise Module for Public Cloud 12 | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:Linux Enterprise Module for Public Cloud 12 | python-jmespath | 0 | 0.9.2-10.6.1 |
| SUSE:Linux Enterprise Module for Public Cloud 12 | python-jsonschema | 0 | 2.2.0-3.3.1 |
| SUSE:Linux Enterprise Module for Public Cloud 12 | python-paramiko | 0 | 1.18.5-2.15.1 |
| SUSE:Linux Enterprise Module for Public Cloud 12 | python-pip | 0 | 10.0.1-11.6.1 |
| SUSE:Linux Enterprise Module for Public Cloud 12 | python-ply | 0 | 3.4-3.3.1 |
| SUSE:Linux Enterprise Module for Public Cloud 12 | python-requests | 0 | 2.8.1-6.9.1 |
| SUSE:Linux Enterprise Module for Public Cloud 12 | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:Linux Enterprise Server 12 | python-requests | 0 | 2.8.1-6.9.1 |
| SUSE:Linux Enterprise Server 12 SP1 | python-requests | 0 | 2.8.1-6.9.1 |
| SUSE:Linux Enterprise Server 12 SP2-BCL | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:Linux Enterprise Server 12 SP2-BCL | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:Linux Enterprise Server 12 SP2-BCL | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:Linux Enterprise Server 12 SP2-BCL | python3-requests | 0 | 2.20.1-5.2 |
| SUSE:Linux Enterprise Server 12 SP2-LTSS | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:Linux Enterprise Server 12 SP2-LTSS | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:Linux Enterprise Server 12 SP2-LTSS | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:Linux Enterprise Server 12 SP2-LTSS | python3-requests | 0 | 2.20.1-5.2 |
| SUSE:Linux Enterprise Server 12 SP3-BCL | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:Linux Enterprise Server 12 SP3-BCL | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:Linux Enterprise Server 12 SP3-BCL | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:Linux Enterprise Server 12 SP3-BCL | python3-requests | 0 | 2.20.1-5.2 |
| SUSE:Linux Enterprise Server 12 SP3-LTSS | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:Linux Enterprise Server 12 SP3-LTSS | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:Linux Enterprise Server 12 SP3-LTSS | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:Linux Enterprise Server 12 SP3-LTSS | python3-requests | 0 | 2.20.1-5.2 |
| SUSE:Linux Enterprise Server 12 SP4 | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:Linux Enterprise Server 12 SP4 | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:Linux Enterprise Server 12 SP4 | python-ply | 0 | 3.4-3.3.1 |
| SUSE:Linux Enterprise Server 12 SP4 | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:Linux Enterprise Server 12 SP4 | python3-requests | 0 | 2.20.1-5.2 |
| SUSE:Linux Enterprise Server 12 SP5 | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:Linux Enterprise Server 12 SP5 | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:Linux Enterprise Server 12 SP5 | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:Linux Enterprise Server 12 SP5 | python3-requests | 0 | 2.20.1-5.2 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | python-requests | 0 | 2.8.1-6.9.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | python-requests | 0 | 2.8.1-6.9.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | python3-requests | 0 | 2.20.1-5.2 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | python3-requests | 0 | 2.20.1-5.2 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | python-ply | 0 | 3.4-3.3.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | python3-requests | 0 | 2.20.1-5.2 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | python3-requests | 0 | 2.20.1-5.2 |
| SUSE:Linux Enterprise Software Development Kit 12 SP5 | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP5 | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP5 | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP5 | python3-requests | 0 | 2.20.1-5.2 |
| SUSE:Linux Enterprise Workstation Extension 12 SP5 | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP5 | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP5 | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP5 | python3-requests | 0 | 2.20.1-5.2 |
| SUSE:Manager Proxy 3.2 | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:Manager Proxy 3.2 | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:Manager Proxy 3.2 | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:Manager Proxy 3.2 | python3-requests | 0 | 2.20.1-5.2 |
| SUSE:Manager Server 3.2 | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:Manager Server 3.2 | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:Manager Server 3.2 | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:Manager Server 3.2 | python3-requests | 0 | 2.20.1-5.2 |
| SUSE:OpenStack Cloud 5 | python-requests | 0 | 2.3.0-9.2 |
| SUSE:OpenStack Cloud 7 | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:OpenStack Cloud 7 | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:OpenStack Cloud 7 | python-pip | 0 | 10.0.1-11.6.1 |
| SUSE:OpenStack Cloud 7 | python-ply | 0 | 3.4-3.3.1 |
| SUSE:OpenStack Cloud 7 | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:OpenStack Cloud 7 | python3-requests | 0 | 2.20.1-5.2 |
| SUSE:OpenStack Cloud 8 | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:OpenStack Cloud 8 | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:OpenStack Cloud 8 | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:OpenStack Cloud 8 | python3-requests | 0 | 2.20.1-5.2 |
| SUSE:OpenStack Cloud Crowbar 8 | python-certifi | 0 | 2018.4.16-3.6.1 |
| SUSE:OpenStack Cloud Crowbar 8 | python-chardet | 0 | 3.0.4-5.6.1 |
| SUSE:OpenStack Cloud Crowbar 8 | python-urllib3 | 0 | 1.22-3.20.1 |
| SUSE:OpenStack Cloud Crowbar 8 | python3-requests | 0 | 2.20.1-5.2 |
| Ubuntu:14.04:LTS | requests | 0 | 2.2.1-1ubuntu0.2 |
| openSUSE:Tumbleweed | python-pip | 0 | 9.0.1-1.1 |
| openSUSE:Tumbleweed | python-requests | 0 | 2.11.1-1.1 |
| openSUSE:Tumbleweed | python2-pip | 0 | 20.0.2-2.6 |
| pypi | requests | 2.1.0 | No fix |
Related vulnerabilities
- CVE-2024-47081 Requests is a HTTP library. Also affects requests
- CVE-2024-35195 Requests is a HTTP library. Also affects requests
- CVE-2014-1830 Requests (aka python-requests) before 2.3.0 allows remote servers to obtain sensitive… Also affects requests
- CVE-2014-1829 Requests (aka python-requests) before 2.3.0 allows remote servers to obtain a netrc… Also affects requests
- CVE-2013-7459 Heap-based buffer overflow in the ALGnew function in block_templace.c in Python… Also affects python-paramiko
- CVE-2026-8643 pip would treat console_scripts and gui_scripts as paths instead of file names without… Also affects python-pip
- CVE-2026-3219 pip handles concatenated tar and ZIP files as ZIP files regardless of filename or whether… Also affects python-pip
- CVE-2026-1703 When pip is installing and extracting a maliciously crafted wheel archive, files may be… Also affects python-pip