GitHub Advisoryadvisory · Go

GHSA-8r3f-844c-mc37 Golang protojson.Unmarshal function infinite loop when unmarshaling certain forms of invalid JSON

MEDIUM Published 2024-03-06 Modified 2024-11-07 Official page ↗
Aliases
CVE-2024-24786
Ecosystem
Go
Packages
google.golang.org/protobuf, google.golang.org/protobuf/encoding/protojson, google.golang.org/protobuf/internal/encoding/json
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weaknesses
CWE-835
Reviewed
2024-03-13

Affected packages

• Go google.golang.org/protobuf: < 1.33.0 → fixed in 1.33.0 • Go google.golang.org/protobuf/encoding/protojson: < 1.33.0 → fixed in 1.33.0 • Go google.golang.org/protobuf/internal/encoding/json: < 1.33.0 → fixed in 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.

Related

Alias · CVE (1)

  • CVE-2024-24786 The protojson.Unmarshal function can enter an infinite loop when unmarshaling certain forms of invalid JSON. vulnerability

Weakness · CWE (1)

  • CWE-835 Loop with Unreachable Exit Condition weakness

References