CVE-2022-23607 json
Unsafe handling of user-specified cookies in treq
published 2022-02-01 4 y ago modified 2026-06-17 4 mo ago also GHSA-fhpf-pp6p-55qc , PYSEC-2022-26 , EUVD-2022-0341
- cvss
- 6.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.1%
- EPSS 1.1% chance of exploitation in 30 days, percentile 65%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi treq 22.1.0
- twistedmatrix treq 22.1.0
- python-treq Debian 14, Debian 13, Debian 12 22.2.0-0.1
debian advisories DEBIAN-CVE-2022-23607
- python-treq openSUSE Tumbleweed 24.9.1-1.4
- python-treq openSUSE Tumbleweed 22.1.0-1.1
- python-treq Package Hub 15 SP3, openSUSE Leap 15.3 20.3.0-bp153.2.3.1
opensuse advisories openSUSE-SU-2025:15106-1openSUSE-SU-2024:11806-1openSUSE-SU-2022:10098-1
- py3-treq Alpine 3.24 22.1.0-r0
alpine advisories ALPINE-CVE-2022-23607
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-23607 updated cvss 2.6
python-treq: Exposure of Sensitive Information to an Unauthorized Actor
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.08% chance of exploitation in the next 30 days, higher than 65% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
| NVD | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:P/I:N/A:N |
| GitHub | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | treq | <22.1.0 >=21.1.0, <22.1.0 |
22.1.0 |
Affected products
- twisted treq
Classification
References
-
github.com
/twisted/treq/commit/1da6022cc880bbcff59321abe02bf8498b89efb2
web
-
github.com
/twisted/treq/security/advisories/GHSA-fhpf-pp6p-55qc
web, mitigation, third-party-advisory, advisory
-
lists.debian.org
/debian-lts-announce/2022/03/msg00025.html
mailing-list, web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-23607
advisory
-
github.com
/pypa/advisory-database/tree/main/vulns/treq/PYSEC-2022-26.yaml
web
-
github.com
/twisted/treq
package
-
github.com
/twisted/treq/releases/tag/release-22.1.0
web
-
huntr.dev
/bounties/3c9204fc-a3d1-4441-8599-924c5f57e7ae/?token=06d930e37046c914bcb037e85cc227dc7b510b475989fc6983756656
web
Sources
- CVE List CVE-2022-23607
- GitHub Advisory GHSA-fhpf-pp6p-55qc
- NVD CVE-2022-23607
- OSV PYSEC-2022-26
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.