Skip to content

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

Moderate severity GitHub Reviewed Published Mar 6, 2024 to the GitHub Advisory Database • Updated May 2, 2024

Package

gomod google.golang.org/protobuf (Go)

Affected versions

< 1.33.0

Patched versions

1.33.0
gomod google.golang.org/protobuf/encoding/protojson (Go)
< 1.33.0
1.33.0
gomod google.golang.org/protobuf/internal/encoding/json (Go)
< 1.33.0
1.33.0

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.

References

Published by the National Vulnerability Database Mar 5, 2024
Published to the GitHub Advisory Database Mar 6, 2024
Reviewed Mar 13, 2024
Last updated May 2, 2024

Severity

Moderate

Weaknesses

CVE ID

CVE-2024-24786

GHSA ID

GHSA-8r3f-844c-mc37

Credits

Checking history
See something to contribute? Suggest improvements for this vulnerability.