VDB

CVE-2022-23607

CVE-2022-23607 PUBLISHED CVSS 6.5 MEDIUM

Unsafe handling of user-specified cookies in treq

Reported by github_m · Published February 1, 2022

treq is fixed in 22.1.0 (PyPI)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
treqPyPI22.1.0

Risk scores

CVSS 3.1
6.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

Affected products

VendorProductVersions
twistedtreq< 22.1.0
twistedtreq0
PyPItreq0
alpinepy3-treq0

Timeline

  • Feb 1, 2022 CVE Published
  • Feb 8, 2022 EPSS Score (30 in total, the first dated here)
  • Mar 9, 2026 Security Advisory (3 in total, the first dated here)
  • Jul 5, 2026 Coalition ESS Score
  • Sep 20, 2026 CVE Updated

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2022-23607
vulnetix vdb fixes CVE-2022-23607

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-23607/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›