Skip to content

SSH public key login without private key challenge if mfa is enabled.

Moderate
ibuler published GHSA-jv3c-27cv-w8jv Sep 26, 2023

Package

gomod koko (Go)

Affected versions

<= 3.5.5, 3.6.x <= 3.6.4

Patched versions

>=3.6.5, =3.5.6

Description

Impact

When users enable MFA and use a public key for authentication, the Koko SSH server does not verify the corresponding SSH private key. An attacker could exploit a vulnerability by utilizing a disclosed public key to attempt brute-force authentication against the SSH service

Details

The user 'foo' generated an SSH public key named 'test_id_rsa.pub' for updating settings. An attacker could potentially exploit this by using the public key to attempt brute-force authentication against the SSH service.

ssh foo@<koko_ip>  -p2222 -i test_id_rsa.pub
foo
Please Enter MFA Code.
(foo@<koko_ip>) [OTP Code]:

Patches

Safe versions: >= v3.6.5,== v3.5.6

Workarounds

It is recommended to upgrade the safe versions.

After upgrade, use the following command to check whether the vulnerability is fixed:

ssh foo@<koko_ip>  -p2222 -i test_id_rsa.pub
Load key "test_id_rsa.pub": invalid format

References

Thanks for Ethan Yang & Hui Song & pokerstarxy found and report this vulnerability

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L

CVE ID

CVE-2023-42818

Weaknesses

No CWEs

Credits