Miggo Logo

CVE-2022-27774: An insufficiently protected credentials vulnerability exists in curl 4.9 to and include curl 7.82...

5.7

CVSS Score
3.1

Basic Information

EPSS Score
0.48205%
Published
6/3/2022
Updated
4/7/2024
KEV Status
No
Technology
-

Technical Details

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

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability (CVE-2022-27774) describes a credential leak when curl follows HTTP(S) redirects with authentication to different protocols or port numbers. The commit af2d6743a13537989495b660b85f4997045b521c, titled 'http: clear auth details on host/port/scheme change', directly addresses this. The core logic change is within the Curl_follow function in lib/http.c. This function decides whether to carry over authentication credentials during a redirect. The patch introduces checks for hostname, port, and scheme mismatches between the original and redirected URLs. If a mismatch occurs, the authentication details (data->state.aptr.user, data->state.aptr.passwd, and related state flags) are now explicitly cleared. The absence of this clearing logic before the patch is the vulnerability. Therefore, Curl_follow is the key function that, when processing a redirect under vulnerable conditions, would lead to the credential leak and would appear in a runtime profile during exploitation.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*n insu**i*i*ntly prot**t** *r***nti*ls vuln*r**ility *xists in *url *.* to *n* in*lu** *url *.**.* *r* *****t** t**t *oul* *llow *n *tt**k*r to *xtr**t *r***nti*ls w**n *ollows *TTP(S) r**ir**ts is us** wit* *ut**nti**tion *oul* l**k *r***nti*ls to

Reasoning

T** vuln*r**ility (*V*-****-*****) **s*ri**s * *r***nti*l l**k w**n *url *ollows *TTP(S) r**ir**ts wit* *ut**nti**tion to *i***r*nt proto*ols or port num**rs. T** *ommit `****************************************`, titl** '*ttp: *l**r *ut* **t*ils on