Infinite loop Affecting std/encoding/binary package, versions <1.13.15>=1.14.0-0 <1.14.7


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
4.73% (91st 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-STDENCODINGBINARY-14550725
  • published6 Jan 2026
  • disclosed1 Jul 2022
  • creditDiederik Loerakker, Jonny Rhea, Raúl Kripalani, Preston Van Loon

Introduced: 1 Jul 2022

CVE-2020-16845  (opens in a new tab)
CWE-835  (opens in a new tab)

How to fix?

Upgrade std/encoding/binary to version 1.13.15, 1.14.7 or higher.

Overview

std/encoding/binary is a Go standard library package std/encoding/binary

Affected versions of this package are vulnerable to Infinite loop.

Go Vulnerability Report:
ReadUvarint and ReadVarint can read an unlimited number of bytes from invalid inputs.Certain invalid inputs to ReadUvarint or ReadVarint can cause these functions to read an unlimited number of bytes from the ByteReader parameter before returning an error. This can lead to processing more input than expected when the caller is reading directly from a network and depends on ReadUvarint or ReadVarint only consuming a small, bounded number of bytes, even from invalid inputs.

CVSS Base Scores

version 4.0
version 3.1