Skip to content

GHSA-8c26-wmh5-6g9v CVE-2022-27191 GO-2021-0356

golang.org/x/crypto/ssh Denial of service via crafted Signer

High Go
Severity
7.5 / 10
High · CVSS 3.1
Exploit chance (EPSS)
3.93%
Chance of exploitation in the next 30 days. Higher than 90.37% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-327 Use of a Broken or Risky Cryptographic Algorithm
Fix
0.0.0-20220314234659-1baeb1ce4c0b
Upgrade golang.org/x/crypto to this version or later

Description

The golang.org/x/crypto/ssh package before 0.0.0-20220314234659-1baeb1ce4c0b for Go allows an attacker to crash a server in certain circumstances involving AddHostKey.

Affected versions

Go

PackageVulnerableFixed in
golang.org/x/crypto
< 0.0.0-20220314234659-1baeb1ce4c0b
0.0.0-20220314234659-1baeb1ce4c0b

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

golang.org/x/crypto Go → 0.0.0-20220314234659-1baeb1ce4c0b

go
go get golang.org/x/crypto@v0.0.0-20220314234659-1baeb1ce4c0b && go mod tidy

Severity breakdown

CVSS 3.1 7.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

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

Weakness

CWE-327: Use of a Broken or Risky Cryptographic Algorithm

The product uses a broken or risky cryptographic algorithm or protocol.

How to prevent it
  • Architecture and Design: When there is a need to store or transmit sensitive data, use strong, up-to-date cryptographic algorithms to encrypt that data. Select a well-vetted algorithm that is currently considered to be strong by experts in the field, and use well-tested implementations. As with all cryptographic mechanisms, the source code should be available for analysis. For example, US government systems require FIPS 140-2 certification [REF-1192]. Do not develop custom or private cryptographic algorithms. They will likely be exposed to attacks that are well-understood by cryptographers. Reverse engineering techniques are mature. If the algorithm can be compromised if attackers find out how it works, then it is especially weak. Periodically ensure that the cryptography has not become obsolete. Some older algorithms, once thought to require a billion years of computing time, can now be broken in days or hours. This includes MD4, MD5, SHA1, DES, and other algorithms that were once regarded as strong. [REF-267]
  • Architecture and Design: Ensure that the design allows one cryptographic algorithm to be replaced with another in the next generation or version. Where possible, use wrappers to make the interfaces uniform. This will make it easier to upgrade to stronger algorithms. With hardware, design the product at the Intellectual Property (IP) level so that one cryptographic algorithm can be replaced with another in the next generation of the hardware product.
  • Architecture and Design: Carefully manage and protect cryptographic keys (see CWE-320). If the keys can be guessed or stolen, then the strength of the cryptography itself is irrelevant.
  • Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. Industry-standard implementations will save development time and may be more likely to avoid errors that can occur during implementation of cryptographic algorithms. Consider the ESAPI Encryption feature.
  • Implementation, Architecture and Design: When using industry-approved techniques, use them correctly. Don't cut corners by skipping resource-intensive steps (CWE-325). These steps are often essential for preventing common attacks.

References

Advisories

Packages

Other links

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GO-2026-6355
Prevent DoS on deadlocked established channel in golang.org/x/crypto/ssh
High Also affects golang.org/x/crypto
GO-2026-6354
Prevent DoS on deadlocked undecided channel in golang.org/x/crypto/ssh
High Also affects golang.org/x/crypto
GO-2026-6303
Source-address critical option not enforced for non-public-key auth callbacks in golang.org/x/crypto/ssh
High Also affects golang.org/x/crypto
GO-2026-5932
The golang.org/x/crypto/openpgp package is unmaintained, unsafe by design, and has known security issues
Not rated yet Also affects golang.org/x/crypto
GHSA-x527-x647-q7gg
golang.org/x/crypto: Invoking VerifiedPublicKeyCallback permissions skip enforcement
Critical Also affects golang.org/x/crypto
GHSA-w879-237q-wc7r
golang.org/x/crypto: Invoking pathological RSA/DSA parameters may cause DoS
High Also affects golang.org/x/crypto
GHSA-vgwf-h737-ff37
golang.org/x/crypto: Invoking client can cause server deadlock on unexpected responses
Critical Also affects golang.org/x/crypto
GHSA-rm3j-f69w-wqmq
golang.org/x/crypto vulnerable to infinite loop on large channel writes
Critical Also affects golang.org/x/crypto
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor