Skip to content
Fencer Vulns
medium 6.5

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 products
    not 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

Weakness
  • CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
  • CWE-425 Direct Request
  • CWE-601 URL Redirection to Untrusted Site

References

Sources

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.