CVE-2022-2818: Cockpit Content Platform vulnerable to 2FA bypass
8.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.71462%
CWE
Published
8/16/2022
Updated
7/21/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
cockpit-hq/cockpit | composer | <= 2.2.1 | 2.2.2 |
Vulnerability Intelligence
Miggo AI
Root 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.