CVE-2022-23607Unsafe handling of user-specified cookies in treq
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | python-treq | Fix pending | UBUNTU-CVE-2022-23607 | |
| Ubuntu 26.04 | python-treq | Under investigation | UBUNTU-CVE-2022-23607 | |
| Ubuntu 25.10 | python-treq | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-23607 | |
| Ubuntu 24.04 | python-treq | Under investigation | UBUNTU-CVE-2022-23607 | |
| Ubuntu 22.04 | python-treq | Under investigation | UBUNTU-CVE-2022-23607 | |
| Ubuntu 20.04 | python-treq | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-23607 | |
| Ubuntu 18.04 | python-treq | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-23607 | |
| Debian 14 | python-treq | Fixed | 22.2.0-0.1 | DEBIAN-CVE-2022-23607 |
| Debian 13 | python-treq | Fixed | 22.2.0-0.1 | DEBIAN-CVE-2022-23607 |
| Debian 12 | python-treq | Fixed | 22.2.0-0.1 | DEBIAN-CVE-2022-23607 |
| Alpine Linux 3.24 | py3-treq | Fixed | 22.1.0-r0 | ALPINE-CVE-2022-23607 |
| PyPI library | treq | Fixed | 22.1.0 | GHSA-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.
- twisted treq: affected: < 22.1.0
References
- https://github.com/twisted/treq/security/advisories/GHSA-fhpf-pp6p-55qc
- https://lists.debian.org/debian-lts-announce/2022/03/msg00025.html
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.