PyPi: Treq

CVE-2022-23607

Safety vulnerability ID: 44726

This vulnerability was reviewed by experts

The information on this page was manually curated by our Cybersecurity Intelligence Team.

Created at Feb 01, 2022 Updated at Sep 19, 2024
Scan your Python projects for vulnerabilities →

Advisory

Treq 22.1.0 includes a fix for CVE-2022-23607: Treq's request methods ('treq.get', 'treq.post', etc.) and 'treq.client.HTTPClient' constructor accept cookies as a dictionary. Such cookies are not bound to a single domain, and are therefore sent to *every* domain ("supercookies"). This can potentially cause sensitive information to leak upon an HTTP redirect to a different domain., e.g. should 'https://example.com' redirect to 'http://cloudstorageprovider.com' the latter will receive the cookie 'session'. Treq 22.1.0 and later bind cookies given to request methods ('treq.request', 'treq.get', 'HTTPClient.request', 'HTTPClient.get', etc.) to the origin of the *url* parameter. For users unable to upgrade, instead of passing a dictionary as the *cookies* argument, pass a 'http.cookiejar.CookieJar' instance with properly domain- and scheme-scoped cookies in it.
https://github.com/twisted/treq/security/advisories/GHSA-fhpf-pp6p-55qc

Affected package

treq

Latest version: 24.9.1

High-level Twisted HTTP Client API

Affected versions

Fixed versions

Vulnerability changelog

===================

Bugfixes
--------

- Cookies specified as a dict were sent to every domain, not just the domain of the request, potentially exposing them on redirect. See `GHSA-fhpf-pp6p-55qc <https://github.com/twisted/treq/security/advisories/GHSA-fhpf-pp6p-55qc>`_. (`#339 <https://github.com/twisted/treq/issues/339>`__)

Resources

Use this package?

Scan your Python project for dependency vulnerabilities in two minutes

Scan your application

Severity Details

CVSS Base Score

MEDIUM 6.5

CVSS v3 Details

MEDIUM 6.5
Attack Vector (AV)
NETWORK
Attack Complexity (AC)
LOW
Privileges Required (PR)
NONE
User Interaction (UI)
REQUIRED
Scope (S)
UNCHANGED
Confidentiality Impact (C)
HIGH
Integrity Impact (I)
NONE
Availability Availability (A)
NONE

CVSS v2 Details

MEDIUM 4.3
Access Vector (AV)
NETWORK
Access Complexity (AC)
MEDIUM
Authentication (Au)
NONE
Confidentiality Impact (C)
PARTIAL
Integrity Impact (I)
NONE
Availability Impact (A)
NONE