What’s Vulnerable › Vulnerabilities

CVE-2024-24786: Infinite loop in JSON unmarshaling in google.golang.org/protobuf

Description

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 products

How to fix

Upgrade to a fixed version: google.golang.org/protobuf/encoding/protojson 1.33.0; google.golang.org/protobuf/internal/encoding/json 1.33.0. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2024-24786 or the next vulnerability affects your stack