Miggo Logo

CVE-2022-31090: CURLOPT_HTTPAUTH option not cleared on change of origin

7.7

CVSS Score
3.1

Basic Information

EPSS Score
0.87491%
Published
6/21/2022
Updated
7/24/2023
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
guzzlehttp/guzzlecomposer< 6.5.86.5.8
guzzlehttp/guzzlecomposer>= 7.0.0, < 7.4.57.4.5

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from incomplete origin validation when handling redirects. The commit shows the check for CURLOPT_HTTPAUTH removal was originally based solely on host comparison (request->getUri()->getHost() !== nextRequest->getUri()->getHost()). The shouldStripSensitiveHeaders method only checked host mismatch and HTTP->HTTPS downgrades, missing port changes. These functions failed to properly clear authentication options when redirecting to different ports or schemes, allowing credentials to leak. The fix replaced these checks with Psr7\UriComparator::isCrossOrigin which properly validates host, port, and scheme changes.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t `*ut*oriz*tion` *****rs on r*qu*sts *r* s*nsitiv* in*orm*tion. W**n usin* our *url **n*l*r, it is possi*l* to us* t** `*URLOPT_*TTP*UT*` option to sp**i*y *n `*ut*oriz*tion` *****r. On m*kin* * r*qu*st w*i** r*spon*s wit* * r**ir**t to *

Reasoning

T** vuln*r**ility st*mm** *rom in*ompl*t* ori*in v*li**tion w**n **n*lin* r**ir**ts. T** *ommit s*ows t** ****k *or `*URLOPT_*TTP*UT*` r*mov*l w*s ori*in*lly **s** sol*ly on *ost *omp*rison (`r*qu*st->**tUri()->**t*ost()` !== `n*xtR*qu*st->**tUri()->