Skip to main content

GoBGP CVE-2026-49837

MEDIUM
Out-of-bounds Read (CWE-125)
2026-07-09 https://github.com/osrg/gobgp GHSA-gjrg-jjr3-56cm
5.9
CVSS 3.1 · Vendor: https://github.com/osrg/gobgp
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach GoBGP TCP port 179
  2. Delivery
    Send crafted BGP OPEN with CapLen=0 on 4-octet AS capability
  3. Exploit
    Parser reads past declared CapLen boundary into adjacent buffer bytes
  4. Execution
    Attacker-controlled bytes interpreted as 4-octet AS number
  5. Persist
    Spoofed AS value influences peer AS validation logic
  6. Impact
    BGP session accepted or rejected on attacker-manipulated terms

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The attacker must be able to reach the GoBGP instance on TCP port 179 and initiate a BGP session establishment - the malformed OPEN message is delivered during the initial handshake before the session is fully established, so no authenticated or established BGP session is required. In practice, BGP port 179 is almost universally restricted to configured neighbor IP addresses via firewall policy, meaning exploitation is realistically limited to: (1) a configured BGP peer sending a malformed OPEN, (2) an attacker capable of IP spoofing a trusted peer's address within the required TCP window, or (3) environments where port 179 is inadvertently exposed without access controls. No special GoBGP configuration flags or non-default settings are required to trigger the vulnerable code path - the parser is invoked for all incoming OPEN messages. What limits exploitation: BGP's typical network-level access restrictions are the primary barrier; the CVSS AC:H rating captures this deployment reality. The impact is bounded to BGP session semantic manipulation - no code execution or data disclosure is possible through this path per the vendor description.

Impact

The vendor-provided CVSS 3.1 score of 5.9 (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N) reflects network-accessible exploitation with high attack complexity and a high integrity impact. The AC:H rating is consistent with the realistic prerequisite that the attacker must occupy a BGP peer position or reach the BGP listener on TCP/179 - BGP is not typically exposed to arbitrary internet clients. There is no CISA KEV listing, and no EPSS probability score was provided in the available intelligence, leaving exploitation likelihood unquantified beyond the existence of a parser-level POC. The POC is described in detail in the advisory, which elevates this beyond purely theoretical risk. A critical signal conflict exists in the provided metadata: the intelligence tags classify this as RCE, Buffer Overflow, and Information Disclosure, all of which are explicitly excluded by the CVE description itself. This conflict suggests tag ingestion from an imprecise source and must be flagged - security teams who triage on tags alone will dramatically overestimate severity. The real-world risk is manipulation of BGP session establishment semantics: meaningful in BGP-dependent routing infrastructure but bounded by the requirement to reach port 179 and the non-exploitability for code execution.

Exploit ScenarioDerived

An attacker with TCP connectivity to a GoBGP instance on port 179 sends a crafted BGP OPEN message containing a 4-octet AS capability (code 65) with CapLen set to 0, immediately followed by four bytes encoding an arbitrary AS number such as 0x0000fde8 (AS 65000). The GoBGP parser advances past the two-byte capability header, reads the following four bytes from the unconstrained remaining buffer as the AS value despite the declared zero-length, and uses this attacker-influenced value during peer AS validation - potentially causing the session to be accepted or rejected based on the attacker-supplied AS identity rather than the legitimate capability data. A parser-level proof-of-concept demonstrating this behavior without requiring a full BGP session is documented in the advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 09, 2026

Boundary validation failure in GoBGP's BGP OPEN capability parser allows a remote peer to send a malformed OPEN message that causes concrete capability decoders to read beyond the declared CapLen field, enabling attacker-controlled bytes to be interpreted as capability values - most critically, as a 4-octet AS number that influences peer AS validation and BGP session establishment decisions. Affected is GoBGP v4 (pkg:go/github.com_osrg_gobgp_v4), with the 4-octet AS capability (code 65) identified as the highest-impact case. A parser-level proof-of-concept is publicly described in GitHub Security Advisory GHSA-gjrg-jjr3-56cm; no active exploitation has been confirmed and this CVE does not appear in the CISA KEV catalog. IMPORTANT METADATA CONFLICT: The provided intelligence tags label this as 'RCE, Buffer Overflow, Information Disclosure' - all three directly contradict the CVE description, which explicitly states the issue is not arbitrary memory corruption, remote code execution, or information disclosure; security teams must disregard those tags.

RemediationAI

Consult the GitHub Security Advisory GHSA-gjrg-jjr3-56cm at https://github.com/osrg/gobgp/security/advisories/GHSA-gjrg-jjr3-56cm for the authoritative fixed release version; no specific patched version number was confirmed in the available intelligence data, so the upstream fix should be treated as 'available per vendor advisory - released version not independently confirmed.' As a compensating control while awaiting a patched release, restrict inbound TCP access to port 179 on GoBGP instances to only explicitly configured, trusted peer IP addresses using host-based or perimeter firewall rules - this directly limits who can deliver a malformed OPEN message, though it does not eliminate risk if a trusted peer is itself compromised. Where supported by the deployment environment, enabling TCP MD5 session authentication for BGP peering sessions adds an additional layer that requires the attacker to know the session secret. Operators should also audit BGP session logs for unexpected AS number negotiation values as an indicator of attempted exploitation.

Affected Packages

go github.com/osrg/gobgp/v4 fix: 4.6.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in go

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

GoBGP is an open-source BGP (Border Gateway Protocol) daemon and library written in Go, identified by package reference pkg:go/github.com_osrg_gobgp_v4. The vulnerability is rooted in CWE-125 (Out-of-bounds Read) and resides in the capability parsing logic within pkg/packet/bgp/bgp.go and pkg/packet/bgp/validate.go. BGP OPEN messages carry optional parameters containing capabilities, each encoded as a three-part structure: a capability code byte, a capability length byte (CapLen), and a value field of exactly CapLen bytes. The vulnerable pattern occurs because the generic parser correctly records CapLen but then advances the data slice past only the two-byte header before handing it to concrete capability decoders; those decoders then read from the full remaining buffer rather than from a sub-slice limited to CapLen. In Go, this does not produce a panic or true memory corruption because slice bounds are enforced by the runtime, but it does allow bytes belonging to the next capability in the buffer to be parsed as if they were part of the current capability's value. The 4-octet AS number capability (code 65, RFC 6793) is the most security-relevant case: a CapLen of 0 with four following bytes causes those bytes to be parsed as the AS number, which may then influence peer AS validation during session establishment.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/osrg/gobgp) PRIMARY 5.9 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
vuln.today AI 5.9 MEDIUM

AV:N for network-delivered BGP OPEN; AC:H because attacker must reach TCP/179 in a typically restricted peer environment; I:H for AS validation manipulation; C:N and A:N per explicit vendor exclusion of those impact classes.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
SUSE MEDIUM
Red Hat 7.4 HIGH

Primary rating from Vendor (https://github.com/osrg/gobgp).

CVSS VectorVendor: https://github.com/osrg/gobgp

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

DescriptionCVE.org

Summary

GoBGP contains a BGP OPEN capability parsing issue where several concrete capability decoders may parse data from the full remaining capability buffer instead of the slice bounded by the declared capability length, CapLen. A malformed BGP OPEN message can cause bytes from a following capability to be interpreted as part of the current capability. The most security-relevant case is the 4-octet AS capability, where a capability with CapLen == 0 may cause the parser to read bytes from the following capability as the 4-octet AS value. This parsed value may later affect peer AS validation during BGP session establishment.

Details

The issue is in the BGP OPEN capability parser under:

  • pkg/packet/bgp/bgp.go
  • pkg/packet/bgp/validate.go

- The BGP OPEN optional parameter capability format includes a capability code, a capability length field, and a capability value. Each concrete capability decoder should only parse bytes inside the declared capability value boundary. In affected versions, the generic capability parser records the declared CapLen, but several concrete capability decoders continue parsing from the full remaining capability buffer after advancing past the two-byte capability header. Conceptually, the vulnerable pattern is:

go
data = data[2:]
// decoder reads from data without first limiting it to CapLen
### PoC
The following parser-level proof of concept demonstrates the issue without requiring a full BGP session or a running `bgpd` instance.
The malformed capability uses:
- Capability Code: `65` (`BGP_CAP_FOUR_OCTET_AS_NUMBER`)
- Declared `CapLen`: `0`
- Four following bytes: `00 00 fd e8`

Although the capability declares an empty value, affected versions parse the following four bytes as the 4-octet AS value `65000`.
### Impact
A remote peer that can send a malformed BGP OPEN message to a GoBGP instance may cause capability values to be parsed from outside their declared `CapLen` boundaries.
In the 4-octet AS capability case, this may affect:
- peer AS validation;
- capability negotiation;
- interpretation of malformed OPEN messages;
- acceptance or rejection decisions during BGP session establishment.
This issue does not appear to be arbitrary memory corruption, remote code execution, or information disclosure. It is a protocol parser boundary validation issue that can affect BGP OPEN validation semantics.

Threat Intelligence Overview

EPSS Score
0.3%
Top 83% exploitable
Prevalence
Low
niche Go BGP library used primarily in cloud-native and SDN networking
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)CVE.org

pkg:go/github.com_osrg_gobgp_v4

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy