Insecure Randomness Affecting golang.org/x/crypto/salsa20/salsa package, versions <0.0.0-20190320223903-b7391e95e576


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.49% (77th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Insecure Randomness vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GOLANGORGXCRYPTOSALSA20SALSA-3314982
  • published8 Feb 2023
  • disclosed24 May 2022
  • creditMichael McLoughlin

Introduced: 24 May 2022

CVE-2019-11840  (opens in a new tab)
CWE-330  (opens in a new tab)

How to fix?

Upgrade golang.org/x/crypto/salsa20/salsa to version 0.0.0-20190320223903-b7391e95e576 or higher.

Overview

golang.org/x/crypto/salsa20/salsa is a package providing low-level access to functions in the Salsa family

Affected versions of this package are vulnerable to Insecure Randomness. If more than 256 GiB of keystream is generated, or if the counter otherwise grows larger than 32 bits, the amd64 implementation will first generate incorrect output, and then cycle back to previously generated keystream. Repeated keystream bytes can lead to loss of confidentiality in encryption applications, or to predictability in CSPRNG applications.

CVSS Base Scores

version 3.1