CVEfocus › CVE database › CVE-2022-23607

CVE-2022-23607Unsafe handling of user-specified cookies in treq

CVSS 6.5 MediumEPSS 1.1% (higher than 65% of CVEs)Published 2022-02-01Updated 2024-08-03Assigner: GitHub_M

treq is an HTTP library inspired by requests but written on top of Twisted's Agents. 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 2021.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. Users are advised to upgrade. 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.

CWE-200

What to do

Fixed builds are available from Alpine, Debian, PyPI: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

5Fixed
1Fix pending
3Under investigation
3Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10python-treqFix pendingUBUNTU-CVE-2022-23607
Ubuntu 26.04python-treqUnder investigationUBUNTU-CVE-2022-23607
Ubuntu 25.10python-treqWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2022-23607
Ubuntu 24.04python-treqUnder investigationUBUNTU-CVE-2022-23607
Ubuntu 22.04python-treqUnder investigationUBUNTU-CVE-2022-23607
Ubuntu 20.04python-treqWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2022-23607
Ubuntu 18.04python-treqWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2022-23607
Debian 14python-treqFixed22.2.0-0.1DEBIAN-CVE-2022-23607
Debian 13python-treqFixed22.2.0-0.1DEBIAN-CVE-2022-23607
Debian 12python-treqFixed22.2.0-0.1DEBIAN-CVE-2022-23607
Alpine Linux 3.24py3-treqFixed22.1.0-r0ALPINE-CVE-2022-23607
PyPI librarytreqFixed22.1.0GHSA-fhpf-pp6p-55qc

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.