Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/gopacket/gopacket
  4. ›
  5. CVE-2026-54345

CVE-2026-54345: GoPacket's Diameter AVP decoder: uint32 underflow on vendor header size leads to unbounded ~4 GiB allocation (unauthenticated remote DoS)

July 28, 2026

The Diameter AVP decoder in github.com/gopacket/gopacket computes dataLength := avp.Length - uint32(headerSize) without first ensuring avp.Length >= headerSize. When the Vendor flag is set, headerSize is 12, but the only length guard upstream rejects avp.Length < 8. An AVP with the Vendor flag set and a 24-bit Length field of 8, 9, 10, or 11 therefore underflows the uint32 subtraction to ~4,294,967,292, which is passed straight to make([]byte, dataLength). A single 32-byte Diameter message forces a ~4 GiB allocation; a short burst of such messages exhausts memory and OOM-kills memory-constrained collectors. This is an unauthenticated remote denial of service (CWE-191 integer underflow -> CWE-770 unbounded allocation).

References

  • github.com/advisories/GHSA-6r28-9ppf-4hj5
  • github.com/gopacket/gopacket/commit/145859d0eaee1a6f5925ffb93851c976449c3311
  • github.com/gopacket/gopacket/releases/tag/v1.6.1
  • github.com/gopacket/gopacket/security/advisories/GHSA-6r28-9ppf-4hj5
  • nvd.nist.gov/vuln/detail/CVE-2026-54345

Code Behaviors & Features

Detect and mitigate CVE-2026-54345 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.6.1

Fixed versions

  • 1.6.1

Solution

Upgrade to version 1.6.1 or above.

Impact 5.3 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-191: Integer Underflow (Wrap or Wraparound)
  • CWE-770: Allocation of Resources Without Limits or Throttling

Source file

go/github.com/gopacket/gopacket/CVE-2026-54345.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Tue, 11 Aug 2026 00:17:22 +0000.