Lucene search

K
cvelistGoCVELIST:CVE-2024-24786
HistoryMar 05, 2024 - 10:22 p.m.

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

2024-03-0522:22:35
Go
www.cve.org
2
cve-2024-24786
json unmarshaling
golang
protobuf
infinite loop
invalid json
google.protobuf.any
unmarshaloptions.discardunknown

6.2 Medium

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

15.4%

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.

CNA Affected

[
  {
    "vendor": "google.golang.org/protobuf",
    "product": "google.golang.org/protobuf/encoding/protojson",
    "collectionURL": "https://pkg.go.dev",
    "packageName": "google.golang.org/protobuf/encoding/protojson",
    "versions": [
      {
        "version": "0",
        "lessThan": "1.33.0",
        "status": "affected",
        "versionType": "semver"
      }
    ],
    "programRoutines": [
      {
        "name": "UnmarshalOptions.unmarshal"
      },
      {
        "name": "Unmarshal"
      },
      {
        "name": "UnmarshalOptions.Unmarshal"
      }
    ],
    "defaultStatus": "unaffected"
  },
  {
    "vendor": "google.golang.org/protobuf",
    "product": "google.golang.org/protobuf/internal/encoding/json",
    "collectionURL": "https://pkg.go.dev",
    "packageName": "google.golang.org/protobuf/internal/encoding/json",
    "versions": [
      {
        "version": "0",
        "lessThan": "1.33.0",
        "status": "affected",
        "versionType": "semver"
      }
    ],
    "programRoutines": [
      {
        "name": "Decoder.Read"
      },
      {
        "name": "Decoder.Peek"
      }
    ],
    "defaultStatus": "unaffected"
  }
]