ADVISORIES

GitHub Advisory Database

GHSA-8r3f-844c-mc37

Golang protojson.Unmarshal function infinite loop when unmarshaling certain forms of invalid JSON

Details

The protojson.Unmarshal function can enter an infinite loop when unmarshaling certain forms of invalid JSON. This condition can occur when unmarshaling into a message which contains a google.protobuf.Any value, or when the UnmarshalOptions.DiscardUnknown option is set.

Affected packages

EcosystemPackageAffected versions
Gogoogle.golang.org/protobuf
All versions before 1.33.0 (fixed in 1.33.0)
Gogoogle.golang.org/protobuf/encoding/protojson
All versions before 1.33.0 (fixed in 1.33.0)
Gogoogle.golang.org/protobuf/internal/encoding/json
All versions before 1.33.0 (fixed in 1.33.0)

References