Skip to content

CVE-2022-23607 Unsafe handling of user-specified cookies in treq

MediumCVSS 6.5 EPSS 1.1%
Published
Updated
Exploit status
No public exploit known
Technology
UbuntuDebian

Description

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.

Upgrade path

15 packages: 6 fixed, 7 with no fix yet.

PackageAffectedFixed inStatus
ubuntu/python-treq(Ubuntu 18.04) = 15.1.0-1; All versions No fix listed No fix yet
ubuntu/python-treq(Ubuntu 20.04) = 18.6.0-0.1; = 18.6.0-0.2; All versions No fix listed No fix yet
ubuntu/python-treq(Ubuntu 22.04) = 18.6.0-0.2; = 22.2.0-0.1; All versions No fix listed No fix yet
ubuntu/python-treq(Ubuntu 24.04) = 22.2.0-0.1; All versions No fix listed No fix yet
ubuntu/python-treq(Ubuntu 25.10) = 24.9.1-1; All versions No fix listed No fix yet
ubuntu/python-treq(Ubuntu 26.04) = 24.9.1-1; = 25.5.0-1; All versions No fix listed No fix yet
ubuntu/python-treq(Ubuntu 26.10) = 25.5.0-1; = 25.5.0-2; = 26.7.0-1; = 26.7.0-2 +1 more No fix listed No fix yet
alpine/py3-treq(Alpine v3.24) < 22.1.0-r0 22.1.0-r0 Fixed
debian/python-treq(Debian 12) < 22.2.0-0.1 22.2.0-0.1 Fixed
debian/python-treq(Debian 13) < 22.2.0-0.1 22.2.0-0.1 Fixed
debian/python-treq(Debian 14) < 22.2.0-0.1 22.2.0-0.1 Fixed
pypi treq(PyPI) < 22.1.0; = 0.1.0; = 0.2.0; = 0.2.1 +16 more 22.1.0 Fixed
twistedmatrix treq >= 21.1.0, < 22.1.0 22.1.0 Fixed
debian linux = 9.0 No fix listed Versions listed
twisted treq = < 22.1.0 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
pypi treq(PyPI) < 22.1.0 22.1.0
pypi treq(PyPI) = 0.1.0 No fix listed
pypi treq(PyPI) = 0.2.0 No fix listed
pypi treq(PyPI) = 0.2.1 No fix listed
pypi treq(PyPI) = 15.0.0 No fix listed
pypi treq(PyPI) = 15.1.0 No fix listed
pypi treq(PyPI) = 16.12.0 No fix listed
pypi treq(PyPI) = 17.3.0 No fix listed
pypi treq(PyPI) = 17.3.1 No fix listed
pypi treq(PyPI) = 17.7.0 No fix listed
pypi treq(PyPI) = 17.8.0 No fix listed
pypi treq(PyPI) = 18.6.0 No fix listed
pypi treq(PyPI) = 20.3.0 No fix listed
pypi treq(PyPI) = 20.3.0rc1 No fix listed
pypi treq(PyPI) = 20.4.1 No fix listed
pypi treq(PyPI) = 20.9.0 No fix listed
pypi treq(PyPI) = 20.9.0rc1 No fix listed
pypi treq(PyPI) = 21.1.0 No fix listed
pypi treq(PyPI) = 21.5.0 No fix listed
pypi treq(PyPI) >= 21.1.0, < 22.1.0 22.1.0
twisted treq = < 22.1.0 No fix listed
ubuntu/python-treq(Ubuntu:22.04) All versions No fix listed
twistedmatrix treq >= 21.1.0, < 22.1.0 22.1.0
debian linux = 9.0 No fix listed
ubuntu/python-treq(Ubuntu:24.04) All versions No fix listed
Show 22 more
ProductAffected versionsFixed in
ubuntu/python-treq(Ubuntu:26.04) All versions No fix listed
ubuntu/python-treq(Ubuntu:26.10) All versions No fix listed
debian/python-treq(Debian:12) < 22.2.0-0.1 22.2.0-0.1
debian/python-treq(Debian:14) < 22.2.0-0.1 22.2.0-0.1
debian/python-treq(Debian:13) < 22.2.0-0.1 22.2.0-0.1
ubuntu/python-treq(Ubuntu:18.04) All versions No fix listed
ubuntu/python-treq(Ubuntu:18.04) = 15.1.0-1 No fix listed
ubuntu/python-treq(Ubuntu:20.04) All versions No fix listed
ubuntu/python-treq(Ubuntu:20.04) = 18.6.0-0.1 No fix listed
ubuntu/python-treq(Ubuntu:20.04) = 18.6.0-0.2 No fix listed
ubuntu/python-treq(Ubuntu:22.04) = 18.6.0-0.2 No fix listed
ubuntu/python-treq(Ubuntu:22.04) = 22.2.0-0.1 No fix listed
ubuntu/python-treq(Ubuntu:24.04) = 22.2.0-0.1 No fix listed
ubuntu/python-treq(Ubuntu:25.10) All versions No fix listed
ubuntu/python-treq(Ubuntu:25.10) = 24.9.1-1 No fix listed
ubuntu/python-treq(Ubuntu:26.10) = 25.5.0-1 No fix listed
ubuntu/python-treq(Ubuntu:26.10) = 25.5.0-2 No fix listed
ubuntu/python-treq(Ubuntu:26.10) = 26.7.0-1 No fix listed
ubuntu/python-treq(Ubuntu:26.10) = 26.7.0-2 No fix listed
ubuntu/python-treq(Ubuntu:26.04) = 24.9.1-1 No fix listed
ubuntu/python-treq(Ubuntu:26.04) = 25.5.0-1 No fix listed
alpine/py3-treq(Alpine:v3.24) < 22.1.0-r0 22.1.0-r0

References