PT-2022-6958 · Google+9 · Golang.Org/X/Crypto/Ssh+9

Filippo Valsorda

·

Published

2022-03-15

·

Updated

2026-04-01

·

CVE-2022-27191

CVSS v3.1

9.8

Critical

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions golang.org/x/crypto/ssh package before 0.0.0-20220314234659-1baeb1ce4c0b for Go golang.org/x/crypto/ssh versions through 1.16.15 golang.org/x/crypto/ssh versions 1.17.x through 1.17.8
Description The issue is related to the use of defective cryptographic algorithms in the golang.org/x/crypto/ssh package, which can cause a crash in SSH servers under certain circumstances involving AddHostKey. An attacker can exploit this to crash a server. The vulnerability is triggered when a Signer is passed to ServerConfig.AddHostKey that does not implement AlgorithmSigner and returns a key of type “ssh-rsa” from its PublicKey method.
Recommendations For golang.org/x/crypto/ssh package before 0.0.0-20220314234659-1baeb1ce4c0b, update to a version after 0.0.0-20220314234659-1baeb1ce4c0b. For golang.org/x/crypto/ssh versions through 1.16.15, update to a version after 1.16.15. For golang.org/x/crypto/ssh versions 1.17.x through 1.17.8, update to a version after 1.17.8. As a temporary workaround, consider restricting the use of the AddHostKey function with Signers that do not implement AlgorithmSigner until a patch is available.

Fix

Use of a Broken Cryptographic Algorithm

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

ALSA-2022:7469
ALSA-2022:7954
ALSA-2022:8008
ALT-PU-2023-1488
ALT-PU-2025-10794
BDU:2023-05840
CESA-2022_7457
CESA-2022_7469
CLEANSTART-2026-HV28992
CLEANSTART-2026-MF20926
CVE-2022-27191
GHSA-8C26-WMH5-6G9V
GO-2021-0356
MGASA-2023-0213
OPENSUSE-SU-2022_1689-1
OPENSUSE-SU-2022_2834-1
OPENSUSE-SU-2022_2839-1
OPENSUSE-SU-2022_4463-1
OPENSUSE-SU-2024:0319-1
OPENSUSE-SU-2024:12400-1
OPENSUSE-SU-2024:12490-1
OPENSUSE-SU-2024:12550-1
OPENSUSE-SU-2024:12637-1
OPENSUSE-SU-2024:13225-1
RHSA-2022:5068
RHSA-2022:6527
RHSA-2022:7457
RHSA-2022:7469
RHSA-2022:7954
RHSA-2022:8008
RHSA-2022:8932
RHSA-2022_7457
RHSA-2022_7469
RHSA-2022_7954
RHSA-2022_8008
RHSA-2023:1325
RHSA-2023:3366
RLSA-2022:7457
RLSA-2022:7469
SUSE-SU-2022:1507-1
SUSE-SU-2022:1689-1
SUSE-SU-2022:2834-1
SUSE-SU-2022:2839-1
SUSE-SU-2022:2839-2
SUSE-SU-2022:4409-1
SUSE-SU-2022:4463-1
SUSE-SU-2022_1507-1
SUSE-SU-2022_1689-1
SUSE-SU-2023:2183-1
SUSE-SU-2023:2185-1
SUSE-SU-2023:2187-1
SUSE-SU-2023:2579-1
SUSE-SU-2023_2183-1
SUSE-SU-2023_2187-1
SUSE-SU-2024:0191-1
SUSE-SU-2025:03540-1
SUSE-SU-2025:03545-1

Affected Products

Alt Linux
Almalinux
Astra Linux
Centos
Debian
Red Hat
Red Os
Rocky Linux
Suse
Golang.Org/X/Crypto/Ssh