CVE-2022-23607
Unsafe 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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.5
Unsafe 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.
- Record
CVE-2022-23607- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - Weakness
- CWE-200
- Updated
- 2026-11-02
EUVDEUVD-2022-0341
6.5
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.
- Record
EUVD-2022-0341- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-fhpf-pp6p-55qc
7.1
Unsafe handling of user-specified cookies in treq
Impact
Treq's request methods (treq.get, treq.post, HTTPClient.request, HTTPClient.get, etc.) accept cookies as a dictionary, for example:
treq.get('https://example.com/', cookies={'session': '1234'})
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.
Patches
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.
Workarounds
Instead of passing a dictionary as the cookies argument, pass a http.cookiejar.CookieJar instance with properly domain- and scheme-scoped cookies in it:
from http.cookiejar import CookieJar
from requests.cookies import create_cookie
jar = CookieJar()
jar.add_cookie(
create_cookie(
name='session',
value='1234',
domain='example.com',
secure=True,
),
)
client = HTTPClient(cookies=jar)
client.get('https://example.com/')
References
- Originally reported at huntr.dev
- A related issue in the handling of HTTP basic authentication was addressed in Twisted 22.1 (GHSA-92x2-jw7w-xvvx, CVE-2022-21712).
- Record
GHSA-fhpf-pp6p-55qc- CVSS 4.0
- 7.1 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - Weakness
- CWE-200, CWE-425, CWE-601
- Updated
- 2026-11-02
NVD
6.5
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.
- Record
CVE-2022-23607- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:P/I:N/A:N - Weakness
- CWE-200, CWE-425
- Updated
- 2026-11-02
OSVALPINE-CVE-2022-23607
6.5
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.
- Record
ALPINE-CVE-2022-23607- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - Updated
- 2026-11-03
OSV
6.5
Unsafe 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.
- Record
CVE-2022-23607- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - Weakness
- CWE-200
- Updated
- 2026-11-02
Show 7 moreShow less
OSVDEBIAN-CVE-2022-23607
6.5
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.
- Record
DEBIAN-CVE-2022-23607- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - Updated
- 2026-11-03
OSVGHSA-fhpf-pp6p-55qc
7.1
Unsafe handling of user-specified cookies in treq
Impact
Treq's request methods (treq.get, treq.post, HTTPClient.request, HTTPClient.get, etc.) accept cookies as a dictionary, for example:
treq.get('https://example.com/', cookies={'session': '1234'})
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.
Patches
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.
Workarounds
Instead of passing a dictionary as the cookies argument, pass a http.cookiejar.CookieJar instance with properly domain- and scheme-scoped cookies in it:
from http.cookiejar import CookieJar
from requests.cookies import create_cookie
jar = CookieJar()
jar.add_cookie(
create_cookie(
name='session',
value='1234',
domain='example.com',
secure=True,
),
)
client = HTTPClient(cookies=jar)
client.get('https://example.com/')
References
- Originally reported at huntr.dev
- A related issue in the handling of HTTP basic authentication was addressed in Twisted 22.1 (GHSA-92x2-jw7w-xvvx, CVE-2022-21712).
- Record
GHSA-fhpf-pp6p-55qc- CVSS 4.0
- 7.1 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - Weakness
- CWE-200, CWE-425, CWE-601
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2022-23607
6.5
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.
- Record
UBUNTU-CVE-2022-23607- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVopenSUSE-SU-2022:10098-1 No score
Security update for python-treq
This update for python-treq fixes the following issues:
- Fixed CVE-2022-23607 (boo#1195432) binding cookies to the domain.
- Record
openSUSE-SU-2022:10098-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11806-1 No score
python310-treq-22.1.0-1.1 on GA media
These are all security issues fixed in the python310-treq-22.1.0-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11806-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2025:15106-1 No score
python311-treq-24.9.1-1.4 on GA media
These are all security issues fixed in the python311-treq-24.9.1-1.4 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2025:15106-1- Updated
- 2026-11-02
OSVPYSEC-2022-26 No score
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.
- Record
PYSEC-2022-26- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
treqPyPI |
before 22.1.0 | 22.1.0 |
py3-treqAlpine:v3.24 |
before 22.1.0-r0 | 22.1.0-r0 |
python-treqDebian:12 |
before 22.2.0-0.1 | 22.2.0-0.1 |
python-treqDebian:13 |
before 22.2.0-0.1 | 22.2.0-0.1 |
python-treqDebian:14 |
before 22.2.0-0.1 | 22.2.0-0.1 |
python-treqDebian:9 |
before 15.1.0-1+deb9u1, plus listed versions 15.1.0-1 |
15.1.0-1+deb9u1 |
treqPyPI |
before 22.1.0, plus listed versions 0.1.00.2.00.2.115.0.015.1.0 Show 13 moreShow less16.12.017.3.017.3.117.7.017.8.018.6.020.3.020.3.0rc120.4.120.9.020.9.0rc121.1.021.5.0 |
22.1.0 |
treqPyPI |
21.1.0 up to 22.1.0, plus listed versions 21.5.0 |
22.1.0 |
python-treqUbuntu:18.04:LTS |
All versions, plus listed versions 15.1.0-1 |
None known |
python-treqUbuntu:20.04:LTS |
All versions, plus listed versions 18.6.0-0.118.6.0-0.2 |
None known |
Show 9 moreShow less
| Package | Affected | Fixed |
|---|---|---|
python-treqUbuntu:22.04:LTS |
All versions, plus listed versions 18.6.0-0.222.2.0-0.1 |
None known |
python-treqUbuntu:24.04:LTS |
All versions, plus listed versions 22.2.0-0.1 |
None known |
python-treqUbuntu:25.10 |
All versions, plus listed versions 24.9.1-1 |
None known |
python-treqUbuntu:26.10 |
All versions, plus listed versions 25.5.0-125.5.0-226.7.0-126.7.0-2 |
None known |
python-treqUbuntu:26.04:LTS |
All versions, plus listed versions 24.9.1-125.5.0-1 |
None known |
python-treqSUSE:Package Hub 15 SP3 |
before 20.3.0-bp153.2.3.1 | 20.3.0-bp153.2.3.1 |
python-treqopenSUSE:Leap 15.3 |
before 20.3.0-bp153.2.3.1 | 20.3.0-bp153.2.3.1 |
python-treqopenSUSE:Tumbleweed |
before 22.1.0-1.1 | 22.1.0-1.1 |
python-treqopenSUSE:Tumbleweed |
before 24.9.1-1.4 | 24.9.1-1.4 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, aliases, references | OSV | |
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-23607 is a medium vulnerability (CVSS 6.5) in Twisted Treq, published February 1, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.08%, the 65th percentile. Fixed in treq 22.1.0.
References
github.com/twisted/treq/security/advisories/GHSA-fhpf-pp6p-55qc
lists.debian.org/debian-lts-announce/2022/03/msg00025.html
github.com/twisted/treq/commit/1da6022cc880bbcff59321abe02bf8498b89efb2
github.com/twisted/treq/releases/tag/release-22.1.0
huntr.dev/bounties/3c9204fc-a3d1-4441-8599-924c5f57e7ae?token=06d930e37046c914bcb037e85cc227dc7b510b475989fc69837566562ba899277d46b0fb4b1e21cdcb6ddc1b7d9b1ded632cf3a3551ecb89afca16a63b34641284b50479d5195bba2ac09b116f3dd4fad27f54404c2de922c05c8c8b744aec27bb4d4d198cb8b3abf479af0c2d5fbaa10412da7922594ac3eb39
nvd.nist.gov/vuln/detail/CVE-2022-23607
Show 12 moreShow less
github.com/pypa/advisory-database/tree/main/vulns/treq/PYSEC-2022-26.yaml
github.com/advisories/GHSA-fhpf-pp6p-55qc
security.alpinelinux.org/vuln/CVE-2022-23607
github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23607.json
security-tracker.debian.org/tracker/CVE-2022-23607
github.com/twisted/treq
ubuntu.com/security/CVE-2022-23607
cve.org/CVERecord?id=CVE-2022-23607
lists.opensuse.org/archives/list/[email protected]/thread/ZTECPNLPX6QR5JLJ2KQYTBYWNU6ZRUSG
bugzilla.suse.com/1195432
suse.com/security/cve/CVE-2022-23607
lists.opensuse.org/archives/list/[email protected]/thread/RSHEP4XHC66ONG55FD2QGET2PJFLWIVT