Advisory

GHSA-8r3f-844c-mc37

Also known as: CVE-2024-24786, GO-2024-2611

Summary

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

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2024-03-06 00:31 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

google.golang.org/protobuf

Go · All systems

Affected

  • introduced 0, fixed 1.33.0 (semver)

Fixed versions

1.33.0

Fix

google.golang.org/protobuf/encoding/protojson

Go · All systems

Affected

  • introduced 0, fixed 1.33.0 (semver)

Fixed versions

1.33.0

Fix

google.golang.org/protobuf/internal/encoding/json

Go · All systems

Affected

  • introduced 0, fixed 1.33.0 (semver)

Fixed versions

1.33.0

Fix

  • Fixed version 1.33.0
    go get google.golang.org/protobuf/internal/encoding/[email protected]

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences