Miggo Logo

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

6.5

CVSS Score
3.1

Basic Information

EPSS Score
0.4152%
Published
2/1/2022
Updated
11/13/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
treqpip< 22.1.022.1.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from request methods (treq.get, treq.post, HTTPClient.request) accepting cookie dictionaries without domain binding. The commit diff shows cookies were previously converted via cookiejar_from_dict (domain-agnostic), replaced with _scoped_cookiejar_from_dict to enforce domain binding. All methods funnel through HTTPClient.request, making it the core vulnerable function. The public treq.get/post methods inherit this vulnerability as they delegate to HTTPClient.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t Tr*q's r*qu*st m*t*o*s (`tr*q.**t`, `tr*q.post`, `*TTP*li*nt.r*qu*st`, `*TTP*li*nt.**t`, *t*.) ****pt *ooki*s *s * *i*tion*ry, *or *x*mpl*: ```py tr*q.**t('*ttps://*x*mpl*.*om/', *ooki*s={'s*ssion': '****'}) ``` Su** *ooki*s *r* not *ou

Reasoning

T** vuln*r**ility st*mm** *rom r*qu*st m*t*o*s (tr*q.**t, tr*q.post, *TTP*li*nt.r*qu*st) ****ptin* *ooki* *i*tion*ri*s wit*out *om*in *in*in*. T** *ommit *i** s*ows *ooki*s w*r* pr*viously *onv*rt** vi* *ooki*j*r_*rom_*i*t (*om*in-**nosti*), r*pl****