{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-23607","id":"CVE-2022-23607","title":"Unsafe handling of user-specified cookies in treq","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","descriptionLong":"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.","published":"2022-02-01T11:01:07.000Z","updated":"2026-10-28T02:30:48.883440364Z","reserved":"2022-01-19T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"4.0","score":null,"vector":"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","rating":"medium","source":"GitHub"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"github.com"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"GitHub"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:P/I:N/A:N","rating":"medium","source":"NVD"}],"rating":"medium","products":["twisted treq"],"affectedProducts":[{"vendor":"twisted","product":"treq","defaultStatus":null,"versions":[{"status":"affected","version":"< 22.1.0"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"treq","purl":"pkg:pypi/treq","ranges":["<22.1.0",">=21.1.0 <22.1.0"],"fixed":["22.1.0"],"advisory":"GHSA-fhpf-pp6p-55qc"}],"cwes":["CWE-200","CWE-425","CWE-601"],"aliases":["GHSA-fhpf-pp6p-55qc","PYSEC-2022-26"],"references":[{"url":"https://github.com/twisted/treq/security/advisories/GHSA-fhpf-pp6p-55qc","tags":["x_refsource_CONFIRM","x_transferred","Mitigation","Third Party Advisory","advisory","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/03/msg00025.html","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Third Party Advisory","article","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23607.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23607","tags":["advisory"]},{"url":"https://github.com/twisted/treq/commit/1da6022cc880bbcff59321abe02bf8498b89efb2","tags":["web"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/treq/PYSEC-2022-26.yaml","tags":["web"]},{"url":"https://github.com/twisted/treq","tags":["package"]},{"url":"https://github.com/twisted/treq/releases/tag/release-22.1.0","tags":["web"]},{"url":"https://huntr.dev/bounties/3c9204fc-a3d1-4441-8599-924c5f57e7ae/?token=06d930e37046c914bcb037e85cc227dc7b510b475989fc69837566562ba899277d46b0fb4b1e21cdcb6ddc1b7d9b1ded632cf3a3551ecb89afca16a63b34641284b50479d5195bba2ac09b116f3dd4fad27f54404c2de922c05c8c8b744aec27bb4d4d198cb8b3abf479af0c2d5fbaa10412da7922594ac3eb39","tags":["web"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.01083,"epssPercentile":0.65929,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-23607","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23607","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-23607","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-fhpf-pp6p-55qc","ok":true,"note":"GHSA-fhpf-pp6p-55qc"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-23607","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}