Debian LinuxOperating system · Debian

CVE-2022-23607

MEDIUM · 6.5 CVSS v3.1 Published 2022-02-01
Fix available
A fix is available. Upgrade to 22.1.0 or later.
See remediation →
72/100
Remediation priority · Elevated
Remotely reachable No privileges

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

treq HTTP library accepted cookies as a dictionary, which were not bound to any specific domain. These 'supercookies' were sent to every domain the client contacted. When a redirect occurred from one domain to another (e.g., example.com to cloudstorageprovider.com), sensitive cookie data like session identifiers would leak to the redirect target.

MitigationUpgrade to treq 2021.1.0 or later where cookies are bound to the origin of the request URL. Alternatively, replace dictionary-based cookies with http.cookiejar.CookieJar instances containing properly domain-scoped cookies.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Debian LinuxOperating system
Affected:= 9.0
TreqApplication
Affected:>= 21.1.0, < 22.1.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

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

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify treq installation and version
    Run 'pip show treq' or check your requirements file for the installed treq version. Compare against the affected range: >= 21.1.0, < 22.1.0
    Affected if The installed treq version falls within 21.1.0 through 21.x.x (prior to 22.1.0)
  2. Locate code using treq with cookie parameters
    Search your codebase for treq API calls that pass cookies, such as treq.get(), treq.post(), or treq.request() with a 'cookies' keyword argument
    Affected if Code passes cookies as a dictionary to any treq request method
  3. Inspect cookie parameter type
    Examine the cookies parameter being passed - look for patterns like cookies={'session': 'xyz'} which indicates dictionary-based (unbounded) cookies versus cookies=jar where jar is a http.cookiejar.CookieJar
    Affected if Cookies are passed as a plain dictionary (e.g., cookies={'key': 'value'}) rather than a CookieJar object
  4. Determine if redirects are followed
    Check if your treq requests explicitly or implicitly follow redirects (default behavior), and whether cross-domain redirects could occur between different domains in your application workflow
    Affected if Your application follows redirects and makes requests that could redirect from one domain to another (e.g., example.com to a third-party service)
  5. Assess data sensitivity in redirect scenarios
    Review which endpoints use dictionary cookies and could experience cross-domain redirects, exposing session tokens or authentication credentials to redirect target domains
    Affected if Sensitive authentication cookies (session IDs, tokens) are sent via treq dictionary cookies to endpoints that may redirect to different domains

You are affected if you use treq version 21.1.0 through 21.x.x and pass cookies as a dictionary to requests that may follow redirects across different domains.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 22.1.0 or later
Fixed in 22.1.0
Interim mitigation

Upgrade to treq 2021.1.0 or later where cookies are bound to the origin of the request URL. Alternatively, replace dictionary-based cookies with http.cookiejar.CookieJar instances containing properly domain-scoped cookies.

Recommended fix High confidence

treq >= 22.1.0

  1. Update the treq package to version 22.1.0 or later using your Python package manager (e.g., pip install treq>=22.1.0)
  2. After upgrading, verify that your code uses the updated library version by checking treq.__version__
  3. Test your application to ensure cookie handling works as expected with the new version
Caveat Users upgrading from versions before 2021.1.0 should note that cookies must now be passed as a http.cookiejar.CookieJar instance for proper domain scoping; passing a dictionary will now bind cookies to the request URL's domain

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Debian Linux Scoped from the published advisory
  • Consultation2.0 h
  • Implementation4.0 h
  • Testing6.0 h
  • Review / QA2.0 h
14.0 hours of engineering $2,380
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,808.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2022-23607 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2022-23607 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data