7.5high
GoBGP: Remote Denial of Service (Panic) in UpdatePathAttrs4ByteAs via Malformed BGP UPDATE
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.54% (higher than 47% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-8rxh-r2p6-7f2qGO-2026-5266
Description
GoBGP is an open source Border Gateway Protocol (BGP) implementation in the Go Programming Language. Prior to version 4.3.0, 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. This issue has been patched in version 4.3.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| osrg gobgp | < 4.3.0, before 4.3.0 | CVE List, NVD |
| github.com/osrg/gobgp/v4 (Go) | before 4.3.0 | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
GoBGP is an open source Border Gateway Protocol (BGP) implementation in the Go Programming Language. Prior to version 4.3.0, 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. This issue has been patched in version 4.3.0.
GitHub Advisory Database
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.
Go Vulnerability Database
GoBGP: Remote Denial of Service (Panic) in UpdatePathAttrs4ByteAs via Malformed BGP UPDATE in github.com/osrg/gobgp
NVD (es)
GoBGP es una implementación de código abierto del Protocolo de Pasarela Fronteriza (BGP) en el Lenguaje de Programación Go. Antes de la versión 4.3.0, existe una vulnerabilidad remota de denegación de servicio (DoS) en GoBGP donde un mensaje BGP UPDATE malformado puede desencadenar un error en tiempo de ejecución: pánico de índice fuera de rango. Esto ocurre durante el procesamiento de atributos AS de 4 bytes cuando la estructura del mensaje causa un desplazamiento interno del índice de la slice que no se maneja correctamente. Este problema ha sido parcheado en la versión 4.3.0.
References
| https://github.com/osrg/gobgp/security/advisories/GHSA-8rxh-r2p6-7f2q | advisory, exploit, vendor-advisory, web | |
| https://github.com/osrg/gobgp/releases/tag/v4.3.0 | patch, release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-41643 | advisory | |
| https://github.com/osrg/gobgp | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-41643 changed 2026-05-07 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-8rxh-r2p6-7f2q changed 2026-07-24 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-5266 changed 2026-07-24 | CC-BY-4.0 |
| NVD | CVE-2026-41643 changed 2026-10-26 | Public domain |