VDB
Sign up
HIGH7.5

GHSA-8r3f-844c-mc37

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

Quick fix

GHSA-8r3f-844c-mc37 — google.golang.org/protobuf: upgrade to the fixed version with the command below.

go get google.golang.org/protobuf@v1.33.0

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.

Are you affected?

Enter the version of the package you're using.

Affected packages

Go/google.golang.org/protobuf
Introduced in: 0Fixed in: 1.33.0
Fixgo get google.golang.org/protobuf@v1.33.0
Go/google.golang.org/protobuf/encoding/protojson
Introduced in: 0Fixed in: 1.33.0
Fixgo get google.golang.org/protobuf/encoding/protojson@v1.33.0
Go/google.golang.org/protobuf/internal/encoding/json
Introduced in: 0Fixed in: 1.33.0
Fixgo get google.golang.org/protobuf/internal/encoding/json@v1.33.0

References