Skip to main content

GoBGP CVE-2026-41643

HIGH
Improper Validation of Array Index (CWE-129)
2026-04-29 https://github.com/osrg/gobgp GHSA-8rxh-r2p6-7f2q
7.5
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
    Establish BGP peering
  2. Delivery
    Send crafted UPDATE message
  3. Exploit
    Trigger index-out-of-bounds panic
  4. Execution
    GoBGP process terminates
  5. Impact
    Routing service outage

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Array index validation
Exploitation Conditions

BGP peering session in Established state with target GoBGP daemon. Attacker must be configured as BGP neighbor (direct peering) OR must compromise/poison route propagation through existing trusted peer. GoBGP must be running vulnerable version (v4.2.0 or earlier) with default BGP UPDATE message processing enabled - no specific feature flags or non-default configuration required. Passive peering mode explicitly confirmed vulnerable in proof-of-concept, but all peering modes affected since vulnerability exists in core UPDATE parsing logic. Network reachability to TCP port 179 (BGP) required for direct exploitation. Crash occurs regardless of address family (IPv4/IPv6), VPN (L3VPN/EVPN), or other BGP capability negotiation. Limits to exploitation: requires established BGP session, so basic network ACLs blocking TCP 179 from unauthorized sources provide some protection; BGP session authentication (MD5/TCP-AO) restricts attack surface to authenticated peers but does not prevent exploitation by compromised or malicious authenticated peers.

Impact

Real-world risk is HIGH for production BGP deployments despite moderate CVSS 7.5 score. CVSS vector AV:N/AC:L/PR:N/UI:N indicates trivial exploitation: network-accessible, requires no authentication, no user interaction, and low attack complexity - attackers need only send a single 34-byte malformed UPDATE message. Publicly available exploit code exists with exact hex payload and step-by-step reproduction instructions, lowering attacker skill requirements to script-kiddie level. No EPSS score or CISA KEV status provided in data, suggesting no confirmed mass exploitation campaigns at analysis time. However, BGP infrastructure criticality amplifies impact: successful crash triggers complete routing service outage affecting all peered networks. Attack is automatable and repeatable - adversary can continuously re-crash daemon if auto-restart is configured, creating sustained denial of service. SSVC exploitation status: publicly available proof-of-concept confirmed. Technical impact: total loss of availability for critical routing service. Mitigation priority is IMMEDIATE for any GoBGP deployment accepting UPDATE messages from untrusted or semi-trusted peers (internet exchanges, customer connections, transit providers). Lower risk for purely internal iBGP deployments with strictly controlled peer authentication, but patch still recommended due to routing service criticality and ease of exploitation if perimeter is breached.

Exploit ScenarioDerived

Attacker establishes BGP peering session with target GoBGP daemon (v4.2.0 or earlier) either as direct peer or by compromising existing trusted peer relationship. Once BGP session reaches Established state, attacker sends single malformed UPDATE message containing 34-byte crafted payload with AS4_PATH attribute (Type 17) positioned before AS_PATH attribute (Type 2), using exact hex sequence documented in proof-of-concept. GoBGP daemon processes UPDATE in UpdatePathAttrs4ByteAs function, detects malformed AS4_PATH, removes it from PathAttributes slice causing index shift, then attempts to access AS_PATH using stale index triggering immediate Go runtime panic and process termination. Target network loses all BGP routing capabilities, causing blackhole for traffic toward affected autonomous system. Attacker can repeatedly send malformed UPDATE after each daemon restart to sustain denial of service indefinitely.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Apr 29, 2026

Remote unauthenticated denial of service crashes GoBGP routing daemon via malformed BGP UPDATE message exploiting index-out-of-bounds panic. Attackers send crafted BGP UPDATE with AS4_PATH attribute preceding AS_PATH, causing slice index mismanagement in UpdatePathAttrs4ByteAs function (internal/pkg/table/message.go). Publicly available exploit code exists with hex-level proof-of-concept payload demonstrating immediate process termination. Affects GoBGP v4.2.0 and earlier; vendor-released patch v4.3.0 available per GitHub advisory GHSA-8rxh-r2p6-7f2q. CVSS 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) reflects network-accessible, low-complexity attack requiring no privileges, resulting in complete routing service disruption.

RemediationAI

Upgrade immediately to GoBGP v4.3.0 or later, which contains vendor-confirmed fix for index management in UpdatePathAttrs4ByteAs function. Official patch details and release available at GitHub advisory https://github.com/osrg/gobgp/security/advisories/GHSA-8rxh-r2p6-7f2q. For environments unable to patch immediately, implement strict BGP route filtering using prefix-lists and AS-path access-lists to reject UPDATE messages from untrusted sources, though this provides incomplete protection as trusted peers may propagate malformed routes. Deploy BGP session authentication (TCP MD5 or TCP-AO per RFC 5925) to limit attack surface to authenticated peers only - reduces but does not eliminate risk since authenticated peers can still send malicious UPDATEs. Configure maximum-prefix limits and BGP update-delay timers to provide circuit-breaker behavior if route instability occurs. Enable process monitoring and auto-restart for GoBGP daemon to restore service quickly after crash, though this does not prevent repeated exploitation. Consider deploying redundant route reflectors or BGP speakers with staggered patching to maintain routing availability during remediation. Note that route filtering and authentication introduce operational complexity and may impact convergence time or legitimate route acceptance; test changes in lab environment before production deployment. No workaround fully mitigates risk - upgrade to v4.3.0 is the only complete remediation.

Affected Packages

go github.com/osrg/gobgp/v4 fix: 4.3.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 implements Border Gateway Protocol (BGP-4) in Go for modern routing infrastructure. This vulnerability resides in RFC 6793 4-byte AS number transition code (UpdatePathAttrs4ByteAs function) that handles both legacy 2-byte AS_PATH (Type 2) and 4-byte AS4_PATH (Type 17) attributes. When processing UPDATE messages containing both attributes, the code attempts to merge or validate them to support modern 32-bit autonomous system numbers. The root cause is CWE-129 (Improper Validation of Array Index) manifesting as unsafe slice manipulation: when AS4_PATH is deemed malformed and removed from the msg.PathAttributes slice (line 112), the deletion shifts subsequent elements left, but the function continues using the stale asAttrPos index calculated before removal. Accessing this now-out-of-bounds index at line 206 triggers Go runtime panic, immediately terminating the process. This represents a classic time-of-check-time-of-use issue in memory-safe language runtime bounds checking, where defensive index recalculation after slice modification was omitted. The affected package pkg:go/github.com/osrg/gobgp/v4 versions <=4.2.0 all contain this logic flaw in BGP message parsing critical path.

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 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
SUSE HIGH
Red Hat 7.5 MEDIUM

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

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

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

DescriptionCVE.org

Summary

A remote Denial of Service (DoS) vulnerability exists in GoBGP where a malformed BGP UPDATE message can trigger a runtime error: index out of range panic. This occurs during the processing of 4-byte AS attributes when the message structure causes an internal slice index shift that is not properly handled.

Details

The vulnerability is located in internal/pkg/table/message.go within the UpdatePathAttrs4ByteAs function.

When GoBGP processes a BGP UPDATE message containing both an AS_PATH and an AS4_PATH attribute, it attempts to merge or validate them to support 4-byte AS numbers. If the attributes are ordered such that AS4_PATH (Type 17) appears before AS_PATH (Type 2), and the AS4_PATH is deemed invalid/malformed, the code attempts to remove the AS4_PATH attribute from the msg.PathAttributes slice. It appears the crash happens due to an index shift in msg.PathAttributes:

#GoBGP v4.2.0
// Line 112: If AS4_PATH precedes AS_PATH, the deletion causes all subsequent attributes to shift left.
msg.PathAttributes = append(msg.PathAttributes[:as4AttrPos], msg.PathAttributes[as4AttrPos+1:]...)

// Line 206: The stale asAttrPos index is used here.
//The function continues to use the stale index (asAttrPos) to update the AS_PATH. Since the slice length has decreased, accessing the old index leads to a panic.
msg.PathAttributes[asAttrPos] = bgp.NewPathAttributeAsPath(newIntfParams)

This deletion causes all subsequent attributes in the slice to shift left by one position. However, the function continues to use the original asAttrPos index (calculated before the deletion) to access or modify the AS_PATH attribute later at Line 206. Because the slice is now shorter, the "stale" index points out of bounds, triggering a panic and crashing the entire GoBGP process.

PoC

Environment: * GoBGP version: 4.2.0 Configuration: Passive peering enabled. Reproduction Steps: Configure GoBGP with a neighbor (e.g., 192.168.31.195). Send a specially crafted BGP UPDATE hex payload:

ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
00 22 02
00 00
# Withdrawn Routes Length
00 0b
# Total Path Attribute Length
40 11 01 02
# AS4_PATH (Type 17, Len 1, Val 02) - Triggers the bug
40 02 04 ff ff de ad
# AS_PATH (Type 2, Len 4)

The GoBGP process will immediately crash with: panic: runtime error: index out of range [1] with length 1.

Impact

Vulnerability Type: Remote Denial of Service (DoS). Impacted Users: Any GoBGP deployment (v4.2.0 and earlier) that accepts BGP UPDATE messages from peers. Since this crash occurs in the FSM (Finite State Machine) handling loop, a single malicious peer or a malformed route propagated through a transit provider can consistently crash the BGP daemon, leading to a complete loss of routing capabilities.

Executive ViewAI

Why It Matters

GoBGP routing daemon versions 4.2.0 and earlier are vulnerable to remote denial-of-service attacks that crash the service without authentication, disrupting BGP routing operations. An attacker can send a single malformed BGP UPDATE message to immediately terminate the daemon, potentially causing network outages and service degradation across connected autonomous systems. Organizations running affected GoBGP instances face direct impact to network availability and inter-AS connectivity.

Business Impact: High
Compensating Controls

If upgrade to v4.3.0 cannot be completed immediately: (1) implement network-level ACLs restricting BGP UPDATE messages from untrusted peers; (2) deploy BGP session monitoring and automated restart mechanisms to reduce downtime from crashes; (3) segment BGP routing infrastructure to limit blast radius; (4) enable BGP message validation at upstream peers to filter malformed AS4_PATH attributes before delivery. Vendor-released patch: v4.3.0

Threat Intelligence Overview

EPSS Score
0.1%
Top 70% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS GHSA Vendor GitHub

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 HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

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

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Affected Products (CPE)CVE.org

pkg:go/github.com_osrg_gobgp_v4

Vendor StatusVendor

SUSE

Severity: High

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