Miggo Logo

CVE-2022-2818: Cockpit Content Platform vulnerable to 2FA bypass

8.8

CVSS Score
3.1

Basic Information

EPSS Score
0.71462%
Published
8/16/2022
Updated
7/21/2023
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
cockpit-hq/cockpitcomposer<= 2.2.12.2.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the check() method in Auth.php where user data containing the 'twofa' secret was directly passed to JWT token creation. The pre-patch code shows the 'twofa' => $this->helper('jwt')->create($user) line, which embedded sensitive 2FA data in the token. The commit fixes this by explicitly constructing a limited payload (excluding 'twofa') for the JWT token. This function is clearly responsible for the sensitive data exposure as it handled the 2FA-enabled login flow and token generation.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*o*kpit *ont*nt Pl*t*orm t*rou** v*rsion *.*.* is vuln*r**l* to * two-***tor *ut**nti**tion (***) *yp*ss. T** *** s**r*t is *is*los** in * JWT tok*n **t*r us*r lo*s into t**ir ***ount, *llowin* *n *tt**k*r to *yp*ss t** *** *o**. * p*t** is *v*il**l*

Reasoning

T** vuln*r**ility st*ms *rom t** `****k()` m*t*o* in `*ut*.p*p` w**r* us*r **t* *ont*inin* t** 'two**' s**r*t w*s *ir**tly p*ss** to JWT tok*n *r**tion. T** pr*-p*t** *o** s*ows t** 'two**' => $t*is->**lp*r('jwt')->*r**t*($us*r) lin*, w*i** *m******