Uncontrolled Recursion Affecting std/crypto/rand package, versions <1.17.11>=1.18.0-0 <1.18.3


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
2.28% (84th 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 IDSNYK-GOLANG-STDCRYPTORAND-14565598
  • published6 Jan 2026
  • disclosed9 Jun 2022
  • creditDavis Goodin, Quim Muntal of Microsoft

Introduced: 9 Jun 2022

CVE-2022-30634  (opens in a new tab)
CWE-674  (opens in a new tab)

How to fix?

Upgrade std/crypto/rand to version 1.17.11, 1.18.3 or higher.

Overview

std/crypto/rand is a Go standard library package std/crypto/rand

Affected versions of this package are vulnerable to Uncontrolled Recursion.

Go Vulnerability Report:
in the rand.Read function on Windows when a buffer larger than 1 << 32 - 1 bytes is provided. An attacker can cause the process to hang indefinitely by supplying an excessively large buffer.

CVSS Base Scores

version 4.0
version 3.1