ADVISORIES

Go Vulnerability Database

GO-2021-0142

Unbounded read from invalid inputs in encoding/binary

Details

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.

Affected packages

EcosystemPackageAffected versions
Gostdlib
All versions before 1.13.15 (fixed in 1.13.15)
From 1.14.0-0 before 1.14.7 (fixed in 1.14.7)

References