# CVE-2026-41643: gobgp DoS — Fixed in 4.3.0

🐹

🐹 Go

Not in CISA KEV

HIGH severity

# CVE-2026-41643 — gobgp

HIGH 

CVE-2026-41643 is a high-severity (CVSS 7.5) CWE-129 vulnerability in github.com/osrg/gobgp/v4. A fix is available for github.com/osrg/gobgp/v4 — see the affected versions and patch details below.

GoBGP: Remote Denial of Service (Panic) in UpdatePathAttrs4ByteAs via Malformed BGP UPDATE

Also known as[GHSA-8rxh-r2p6-7f2q](/vulnerability/GHSA-8rxh-r2p6-7f2q)GO-2026-5266

Published

May 7, 2026

Updated

Oct 28, 2026

Affected

1 pkg

Patched

1 / 1

Exploits

None indexed

Exploitation data as of Nov 9, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

## Exploitation Status

### Proof-of-concept exploit code exists

-   CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
-   CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-41643.

## EPSS Exploitation Probability

[via FIRST.org ↗](https://www.first.org/epss/)

0.5%probability of exploitation in next 30 days

Lower Risk0.00%

Lower risk than most CVEs46th percentile — riskier than 46% of all scored CVEsHighest risk

0.00%0.37%0.74%1.10%0.0%0.5%Jun 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from [FIRST.org EPSS](https://www.first.org/epss/).

## How urgent is this, really

## Where this sits among everything scored

## Real-World Exposure

1 pkg affected

🐹`github.com/osrg/gobgp/v4`

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

## Description

#### 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](https://www.google.com/search?q=https://github.com/osrg/gobgp/blob/v4.2.0/internal/pkg/table/message.go%23L206). 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.

## Affected Packages

1 total 1 fixed

Ecosystem

Package

Vulnerable range

Fix

🐹Go

`github.com/osrg/gobgp/v4` 

all versions

4.3.0`go get github.com/osrg/gobgp/v4@v4.3.0`

## Affected Products

1 product · 1 configurations

Application

`gobgp`osrg

< 4.3.0

range

## Detection & mitigation playbook

Open-source dependency

1.  ### Detect
    
    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/osrg/gobgp/v4, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
    
2.  ### Fix
    
    Update github.com/osrg/gobgp/v4 to 4.3.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-41643 is resolved across your whole dependency graph.
    
3.  ### Workarounds
    
    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
    

## Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

This Moderate denial of service flaw in GoBGP is not expected to affect Red Hat products. The vulnerable code path related to malformed BGP UPDATE messages and 4-byte AS attributes is not present in the execution environment of affected Red Hat components, such as netshoot and OpenShift's metallb-rhel8.

Workaround published by Red Hat

> Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

Source: [Red Hat security advisory for CVE-2026-41643](https://access.redhat.com/security/cve/cve-2026-41643) (CC BY 4.0)

## Frequently Asked Questions

\### 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 number

O3 Security · Impact-Aware SCA

### Is CVE-2026-41643 in your dependencies?

Find it across Go, including transitive dependencies.

[Scan my dependencies](/book-demo) [How O3 SCA works](/impact-aware-sca)