Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. google.golang.org/protobuf
  4. ›
  5. CVE-2024-24786

CVE-2024-24786: Golang protojson.Unmarshal function infinite loop when unmarshaling certain forms of invalid JSON

March 6, 2024 (updated November 7, 2024)

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

  • github.com/advisories/GHSA-8r3f-844c-mc37
  • github.com/protocolbuffers/protobuf-go
  • github.com/protocolbuffers/protobuf-go/commit/f01a588e5810b90996452eec4a28f22a0afae023
  • github.com/protocolbuffers/protobuf-go/releases/tag/v1.33.0
  • go.dev/cl/569356
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JDMBHAVSDU2FBDZ45U3A2VLSM35OJ2HU
  • nvd.nist.gov/vuln/detail/CVE-2024-24786
  • pkg.go.dev/vuln/GO-2024-2611
  • security.netapp.com/advisory/ntap-20240517-0002

Code Behaviors & Features

Detect and mitigate CVE-2024-24786 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.33.0

Fixed versions

  • 1.33.0

Solution

Upgrade to version 1.33.0 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')

Source file

go/google.golang.org/protobuf/CVE-2024-24786.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:38 +0000.