CVE-2022-30634
Indefinite hang with large buffers on Windows in crypto/rand
Infinite loop in Read in crypto/rand before Go 1.17.11 and Go 1.18.3 on Windows allows attacker to cause an indefinite hang by passing a buffer larger than 1 << 32 - 1 bytes.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
7.5
Infinite loop in Read in crypto/rand before Go 1.17.11 and Go 1.18.3 on Windows allows attacker to cause an indefinite hang by passing a buffer larger than 1 << 32 - 1 bytes.
- Record
CVE-2022-30634- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-835
- Updated
- 2026-11-02
CVE List No score
Indefinite hang with large buffers on Windows in crypto/rand
Infinite loop in Read in crypto/rand before Go 1.17.11 and Go 1.18.3 on Windows allows attacker to cause an indefinite hang by passing a buffer larger than 1 << 32 - 1 bytes.
- Record
CVE-2022-30634- Updated
- 2026-11-02
EUVDEUVD-2022-52465 No score
Infinite loop in Read in crypto/rand before Go 1.17.11 and Go 1.18.3 on Windows allows attacker to cause an indefinite hang by passing a buffer larger than 1 << 32 - 1 bytes.
- Record
EUVD-2022-52465- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-vfh9-chgv-wfph
7.5
Infinite loop in Read in crypto/rand before Go 1.17.11 and Go 1.18.3 on Windows allows attacker...
Infinite loop in Read in crypto/rand before Go 1.17.11 and Go 1.18.3 on Windows allows attacker to cause an indefinite hang by passing a buffer larger than 1 << 32 - 1 bytes.
- Record
GHSA-vfh9-chgv-wfph- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-835
- Updated
- 2026-11-02
OSVALPINE-CVE-2022-30634
7.5
Infinite loop in Read in crypto/rand before Go 1.17.11 and Go 1.18.3 on Windows allows attacker to cause an indefinite hang by passing a buffer larger than 1 << 32 - 1 bytes.
- Record
ALPINE-CVE-2022-30634- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-03
OSVAZL-78962
7.5
CVE-2022-30634 affecting package golang 1.25.7-1
Infinite loop in Read in crypto/rand before Go 1.17.11 and Go 1.18.3 on Windows allows attacker to cause an indefinite hang by passing a buffer larger than 1 << 32 - 1 bytes.
- Record
AZL-78962- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Show 12 moreShow less
OSVAZL-98796
7.5
CVE-2022-30634 affecting package golang 1.27.1-1
Infinite loop in Read in crypto/rand before Go 1.17.11 and Go 1.18.3 on Windows allows attacker to cause an indefinite hang by passing a buffer larger than 1 << 32 - 1 bytes.
- Record
AZL-98796- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVBELL-CVE-2022-30634
7.5
CVE-2022-30634 does not affect BellSoft software
- Record
BELL-CVE-2022-30634- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVOESA-2022-1783
7.5
golang security update
The Go Programming Language
Security Fix(es):
When httputil.ReverseProxy.ServeHTTP was called with a Request.Header map containing a nil value for the X-Forwarded-For header, ReverseProxy would set the client IP as the value of the X-Forwarded-For header, contrary to its documentation. In the more usual case where a Director function set the X-Forwarded-For header value to nil, ReverseProxy would leave the header unmodified as expected.(CVE-2022-32148)
Calling Decoder.Decode on a message which contains deeply nested structures can cause a panic due to stack exhaustion.(CVE-2022-30635)
Infinite loop in Read in crypto/rand before Go 1.17.11 and Go 1.18.3 on Windows allows attacker to cause an indefinite hang by passing a buffer larger than 1 << 32 - 1 bytes. (CVE-2022-30634)
Calling Unmarshal on a XML document into a Go struct which has a nested field that uses the any field tag can cause a panic due to stack exhaustion.(CVE-2022-30633)
Calling Glob on a path which contains a large number of path separators can cause a panic due to stack exhaustion.(CVE-2022-30632)
Calling Reader.Read on an archive containing a large number of concatenated 0-length compressed files can cause a panic due to stack exhaustion.(CVE-2022-30631)
As required by RFC 8446, section 4.6.1, ticket_age_add now holds arandom 32-bit value. Before this change, this value was always setto 0.(CVE-2022-30629)
Calling Decoder.Skip when parsing a deeply nested XML document can cause a panic due to stack exhaustion.(CVE-2022-28131)
Calling any of the Parse functions on Go source code which contains deeply nested types or declarations can cause a panic due to stack exhaustion.(CVE-2022-1962)
The HTTP/1 client accepted some invalid Transfer-Encoding headers as indicating a chunked encoding. This could potentially allow for request smuggling, but only if combined with an intermediate server that also improperly failed to reject the header as invalid.(CVE-2022-1705)
- Record
OESA-2022-1783- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2022-30634
7.5
Infinite loop in Read in crypto/rand before Go 1.17.11 and Go 1.18.3 on Windows allows attacker to cause an indefinite hang by passing a buffer larger than 1 << 32 - 1 bytes.
- Record
UBUNTU-CVE-2022-30634- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVBIT-golang-2022-30634 No score
Indefinite hang with large buffers on Windows in crypto/rand
Infinite loop in Read in crypto/rand before Go 1.17.11 and Go 1.18.3 on Windows allows attacker to cause an indefinite hang by passing a buffer larger than 1 << 32 - 1 bytes.
- Record
BIT-golang-2022-30634- Updated
- 2026-11-02
OSV No score
Indefinite hang with large buffers on Windows in crypto/rand
Infinite loop in Read in crypto/rand before Go 1.17.11 and Go 1.18.3 on Windows allows attacker to cause an indefinite hang by passing a buffer larger than 1 << 32 - 1 bytes.
- Record
CVE-2022-30634- Updated
- 2026-11-02
OSVGO-2022-0477 No score
Indefinite hang with large buffers on Windows in crypto/rand
On Windows, rand.Read will hang indefinitely if passed a buffer larger than 1 << 32 - 1 bytes.
- Record
GO-2022-0477- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:12123-1 No score
go1.17-1.17.11-1.1 on GA media
These are all security issues fixed in the go1.17-1.17.11-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:12123-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:12124-1 No score
go1.18-1.18.3-1.1 on GA media
These are all security issues fixed in the go1.18-1.18.3-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:12124-1- Updated
- 2026-11-02
OSVSUSE-SU-2022:2004-1 No score
Security update for go1.17
This update for go1.17 fixes the following issues:
Update to go1.17.11 (released 2022-06-01) (bsc#1190649):
- CVE-2022-30634: Fixed crypto/rand rand.Read hangs with extremely large buffers (bsc#1200134).
- CVE-2022-30629: Fixed crypto/tls session tickets lack random ticket_age_add (bsc#1200135).
- CVE-2022-29804: Fixed path/filepath Clean(
.\c:) returnsc:on Windows (bsc#1200137). - CVE-2022-30580: Fixed os/exec empty Cmd.Path can result in running unintended binary on Windows (bsc#1200136).
- Record
SUSE-SU-2022:2004-1- Updated
- 2026-11-02
OSVSUSE-SU-2022:2005-1 No score
Security update for go1.18
This update for go1.18 fixes the following issues:
Update to go1.18.3 (released 2022-06-01) (bsc#1193742):
- CVE-2022-30634: Fixed crypto/rand rand.Read hangs with extremely large buffers (bsc#1200134).
- CVE-2022-30629: Fixed crypto/tls session tickets lack random ticket_age_add (bsc#1200135).
- CVE-2022-29804: Fixed path/filepath Clean(
.\c:) returnsc:on Windows (bsc#1200137). - CVE-2022-30580: Fixed os/exec empty Cmd.Path can result in running unintended binary on Windows (bsc#1200136).
- Record
SUSE-SU-2022:2005-1- Updated
- 2026-11-02
OSVSUSE-SU-2023:2312-1 No score
Security update for go1.18-openssl
This update for go1.18-openssl fixes the following issues:
-
Add subpackage go1.x-libstd compiled shared object libstd.so (jsc#PED-1962)
- Main go1.x package included libstd.so in previous versions
- Split libstd.so into subpackage that can be installed standalone
- Continues the slimming down of main go1.x package by 40 Mb
- Experimental and not recommended for general use, Go currently has no ABI
- Upstream Go has not committed to support buildmode=shared long-term
- Do not use in packaging, build static single binaries (the default)
- Upstream Go go1.x binary releases do not include libstd.so
- go1.x Suggests go1.x-libstd so not installed by default Recommends
- go1.x-libstd does not Require: go1.x so can install standalone
- Provides go-libstd unversioned package name
- Fix build step -buildmode=shared std to omit -linkshared
-
Packaging improvements:
- go1.x Suggests go1.x-doc so not installed by default Recommends
- Use Group: Development/Languages/Go instead of Other
-
Improvements to go1.x packaging spec:
- On Tumbleweed bootstrap with current default gcc13 and gccgo118
- On SLE-12 aarch64 ppc64le ppc64 remove overrides to bootstrap using go1.x package (%bcond_without gccgo). This is no longer needed on current SLE-12:Update and removing will consolidate the build configurations used.
- Change source URLs to go.dev as per Go upstream
- On x86_64 export GOAMD64=v1 as per the current baseline. At this time forgo GOAMD64=v3 option for x86_64_v3 support.
- On x86_64 %define go_amd64=v1 as current instruction baseline
-
Update to version 1.18.10.1 cut from the go1.18-openssl-fips branch at the revision tagged go1.18.10-1-openssl-fips.
- Merge branch dev.boringcrypto.go1.18 into go1.18-openssl-fips
- Merge go1.18.10 into dev.boringcrypto.go1.18
-
go1.18.10 (released 2023-01-10) includes fixes to cgo, the compiler, the linker, and the crypto/x509, net/http, and syscall packages. Refs bsc#1193742 go1.18 release tracking
- go#57705 misc/cgo: backport needed for dlltool fix
- go#57426 crypto/x509: Verify on macOS does not return typed errors
- go#57344 cmd/compile: the loong64 intrinsic for CompareAndSwapUint32 function needs to sign extend its 'old' argument.
- go#57338 syscall, internal/poll: accept4-to-accept fallback removal broke Go code on Synology DSM 6.2 ARM devices
- go#57213 os: TestLstat failure on Linux Aarch64
- go#57211 reflect: sort.SliceStable sorts incorrectly on arm64 with less function created with reflect.MakeFunc and slice of sufficient length
- go#57057 cmd/go: remove test dependency on gopkg.in service
- go#57054 cmd/go: TestScript/version_buildvcs_git_gpg (if enabled) fails on linux longtest builders
- go#57044 cgo: malformed DWARF TagVariable entry
- go#57028 cmd/cgo: Wrong types in compiler errors with clang 14
- go#56833 cmd/link/internal/ppc64: too-far trampoline is reused
- go#56711 net: reenable TestLookupDotsWithRemoteSource and TestLookupGoogleSRV with a different target
- go#56323 net/http: bad handling of HEAD requests with a body
- Record
SUSE-SU-2023:2312-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
goAlpine:v3.16 |
1.18.0 up to 1.18.4-r0 | 1.18.4-r0 |
golangAzure Linux:3 |
through 1.25.7-1 | None known |
golangAzure Linux:3 |
1.27.0 to 1.27.1-1 | None known |
golangBitnami |
before 1.17.11, 1.18.0 up to 1.18.3 | 1.17.111.18.3 |
stdlibGo |
before 1.17.11, 1.18.0-0 up to 1.18.3 | 1.17.111.18.3 |
golangopenEuler:20.03-LTS-SP1 From an advisory covering 10 CVEs |
before 1.15.7-14.oe1 | 1.15.7-14.oe1 |
golangopenEuler:20.03-LTS-SP3 From an advisory covering 10 CVEs |
before 1.15.7-14.oe1 | 1.15.7-14.oe1 |
golangopenEuler:22.03-LTS From an advisory covering 10 CVEs |
before 1.17.3-5.oe2203 | 1.17.3-5.oe2203 |
go1.17SUSE:Linux Enterprise Module for Development Tools 15 SP3 From an advisory covering 4 CVEs |
before 1.17.11-150000.1.37.1 | 1.17.11-150000.1.37.1 |
go1.17SUSE:Linux Enterprise Module for Development Tools 15 SP4 From an advisory covering 4 CVEs |
before 1.17.11-150000.1.37.1 | 1.17.11-150000.1.37.1 |
Show 19 moreShow less
| Package | Affected | Fixed |
|---|---|---|
go1.17openSUSE:Leap 15.3 From an advisory covering 4 CVEs |
before 1.17.11-150000.1.37.1 | 1.17.11-150000.1.37.1 |
go1.17openSUSE:Leap 15.4 From an advisory covering 4 CVEs |
before 1.17.11-150000.1.37.1 | 1.17.11-150000.1.37.1 |
go1.18SUSE:Linux Enterprise Module for Development Tools 15 SP3 From an advisory covering 4 CVEs |
before 1.18.3-150000.1.20.1 | 1.18.3-150000.1.20.1 |
go1.18SUSE:Linux Enterprise Module for Development Tools 15 SP4 From an advisory covering 4 CVEs |
before 1.18.3-150000.1.20.1 | 1.18.3-150000.1.20.1 |
go1.18openSUSE:Leap 15.3 From an advisory covering 4 CVEs |
before 1.18.3-150000.1.20.1 | 1.18.3-150000.1.20.1 |
go1.18openSUSE:Leap 15.4 From an advisory covering 4 CVEs |
before 1.18.3-150000.1.20.1 | 1.18.3-150000.1.20.1 |
go1.18-opensslSUSE:Linux Enterprise Module for Development Tools 15 SP4 From an advisory covering 28 CVEs |
before 1.18.10.1-150000.1.9.1 | 1.18.10.1-150000.1.9.1 |
go1.18-opensslSUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS From an advisory covering 28 CVEs |
before 1.18.10.1-150000.1.9.1 | 1.18.10.1-150000.1.9.1 |
go1.18-opensslSUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS From an advisory covering 28 CVEs |
before 1.18.10.1-150000.1.9.1 | 1.18.10.1-150000.1.9.1 |
go1.18-opensslSUSE:Linux Enterprise Real Time 15 SP3 From an advisory covering 28 CVEs |
before 1.18.10.1-150000.1.9.1 | 1.18.10.1-150000.1.9.1 |
go1.18-opensslSUSE:Linux Enterprise Server 15 SP3-LTSS From an advisory covering 28 CVEs |
before 1.18.10.1-150000.1.9.1 | 1.18.10.1-150000.1.9.1 |
go1.18-opensslSUSE:Linux Enterprise Server for SAP Applications 15 SP3 From an advisory covering 28 CVEs |
before 1.18.10.1-150000.1.9.1 | 1.18.10.1-150000.1.9.1 |
go1.18-opensslSUSE:Enterprise Storage 7.1 From an advisory covering 28 CVEs |
before 1.18.10.1-150000.1.9.1 | 1.18.10.1-150000.1.9.1 |
go1.18-opensslopenSUSE:Leap 15.4 From an advisory covering 28 CVEs |
before 1.18.10.1-150000.1.9.1 | 1.18.10.1-150000.1.9.1 |
go1.18-opensslopenSUSE:Leap 15.5 From an advisory covering 28 CVEs |
before 1.18.10.1-150000.1.9.1 | 1.18.10.1-150000.1.9.1 |
golang-1.8Ubuntu:18.04:LTS |
All versions, plus listed versions 1.8.3-2ubuntu11.8.3-2ubuntu1.18.04.1 |
None known |
golang-1.17Ubuntu:22.04:LTS |
All versions, plus listed versions 1.17-1ubuntu21.17.3-1ubuntu11.17.3-1ubuntu21.17.13-3ubuntu11.17.13-3ubuntu1.21.17.13-3ubuntu1.3 |
None known |
go1.17openSUSE:Tumbleweed From an advisory covering 4 CVEs |
before 1.17.11-1.1 | 1.17.11-1.1 |
go1.18openSUSE:Tumbleweed From an advisory covering 4 CVEs |
before 1.18.3-1.1 | 1.18.3-1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| affected, aliases, references | OSV | |
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-30634 is a high vulnerability (CVSS 7.5) in Go Standard Library Crypto/rand, published June 7, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.28%, the 83rd percentile. Fixed in go 1.18.4-r0.
References
go.dev/cl/402257
go.googlesource.com/go/+/bb1f4416180511231de6d17a1f2f55c82aafc863
go.dev/issue/52561
groups.google.com/g/golang-announce/c/TzIC9-t8Ytg/m/IWz5T6x7AAAJ
pkg.go.dev/vuln/GO-2022-0477
nvd.nist.gov/vuln/detail/CVE-2022-30634
Show 84 moreShow less
security.netapp.com/advisory/ntap-20220915-0004
github.com/advisories/GHSA-vfh9-chgv-wfph
security.alpinelinux.org/vuln/CVE-2022-30634
docs.bell-sw.com/security/cves/CVE-2022-30634
pkg.go.dev
github.com/CVEProject/cvelistV5/tree/main/cves/2022/30xxx/CVE-2022-30634.json
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2022-1783
nvd.nist.gov/vuln/detail/CVE-2022-32148
nvd.nist.gov/vuln/detail/CVE-2022-30635
nvd.nist.gov/vuln/detail/CVE-2022-30633
nvd.nist.gov/vuln/detail/CVE-2022-30632
nvd.nist.gov/vuln/detail/CVE-2022-30631
nvd.nist.gov/vuln/detail/CVE-2022-30629
nvd.nist.gov/vuln/detail/CVE-2022-28131
nvd.nist.gov/vuln/detail/CVE-2022-1962
nvd.nist.gov/vuln/detail/CVE-2022-1705
suse.com/support/update/announcement/2022/suse-su-20222004-1
bugzilla.suse.com/1190649
bugzilla.suse.com/1200134
bugzilla.suse.com/1200135
bugzilla.suse.com/1200136
bugzilla.suse.com/1200137
suse.com/security/cve/CVE-2022-29804
suse.com/security/cve/CVE-2022-30580
suse.com/security/cve/CVE-2022-30629
suse.com/security/cve/CVE-2022-30634
suse.com/support/update/announcement/2022/suse-su-20222005-1
bugzilla.suse.com/1193742
suse.com/support/update/announcement/2023/suse-su-20232312-1
bugzilla.suse.com/1183043
bugzilla.suse.com/1198423
bugzilla.suse.com/1198424
bugzilla.suse.com/1198427
bugzilla.suse.com/1199413
bugzilla.suse.com/1201434
bugzilla.suse.com/1201436
bugzilla.suse.com/1201437
bugzilla.suse.com/1201440
bugzilla.suse.com/1201443
bugzilla.suse.com/1201444
bugzilla.suse.com/1201445
bugzilla.suse.com/1201447
bugzilla.suse.com/1201448
bugzilla.suse.com/1202035
bugzilla.suse.com/1203185
bugzilla.suse.com/1204023
bugzilla.suse.com/1204024
bugzilla.suse.com/1204025
bugzilla.suse.com/1204941
bugzilla.suse.com/1206134
bugzilla.suse.com/1206135
bugzilla.suse.com/1208270
bugzilla.suse.com/1208271
bugzilla.suse.com/1208272
bugzilla.suse.com/1208491
suse.com/security/cve/CVE-2022-1705
suse.com/security/cve/CVE-2022-1962
suse.com/security/cve/CVE-2022-24675
suse.com/security/cve/CVE-2022-27536
suse.com/security/cve/CVE-2022-27664
suse.com/security/cve/CVE-2022-28131
suse.com/security/cve/CVE-2022-28327
suse.com/security/cve/CVE-2022-2879
suse.com/security/cve/CVE-2022-2880
suse.com/security/cve/CVE-2022-29526
suse.com/security/cve/CVE-2022-30630
suse.com/security/cve/CVE-2022-30631
suse.com/security/cve/CVE-2022-30632
suse.com/security/cve/CVE-2022-30633
suse.com/security/cve/CVE-2022-30635
suse.com/security/cve/CVE-2022-32148
suse.com/security/cve/CVE-2022-32189
suse.com/security/cve/CVE-2022-41715
suse.com/security/cve/CVE-2022-41716
suse.com/security/cve/CVE-2022-41717
suse.com/security/cve/CVE-2022-41720
suse.com/security/cve/CVE-2022-41723
suse.com/security/cve/CVE-2022-41724
suse.com/security/cve/CVE-2022-41725
ubuntu.com/security/CVE-2022-30634
groups.google.com/g/golang-announce/c/TzIC9-t8Ytg
github.com/golang/go/commit/32dedaa69e22f1a058ae90b9484fd4c3b46fbcbf
github.com/golang/go/commit/2be03d789de905a4b050ff5f3a51b724e1b09494
cve.org/CVERecord?id=CVE-2022-30634