# CVE-2026-49837: GoBGP out-of-bounds read in BGP OPEN capability parser

Source: https://junglewise.ai/threats/cve-2026-49837-gobgp-out-of-bounds-read-in-bgp-open-capability-parser  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-10. Updated: 2026-07-10  
License: CC BY 4.0 with a link back

CVE-2026-49837 · Severity: medium · CVSS 5.9 · Published 2026-09-10

GoBGP is an open-source implementation of the Border Gateway Protocol (BGP) used for routing internet traffic. A flaw in how it processes connection requests allows a remote attacker to send specially crafted messages that trick the system into misidentifying the identity or capabilities of a connecting peer. This can lead to unauthorized session establishment or the incorrect application of routing policies, potentially disrupting network stability.

Technologies: [github.com/osrg/gobgp/v4 (Go)](https://junglewise.ai/threats/technologies/github-com-osrg-gobgp-v4), [Osrg Gobgp](https://junglewise.ai/threats/technologies/gobgp). Vendors: [Go](https://junglewise.ai/threats/vendors/go), [Osrg](https://junglewise.ai/threats/vendors/osrg).

## Quick answers

**Is CVE-2026-49837 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-49837 being exploited in the wild.

**How severe is CVE-2026-49837?** Medium severity, with a CVSS score of 5.9, published 10 September 2026.

**Which products and versions are affected?** github.com/osrg/gobgp/v4 (Go) <= 4.5.0, SEMVER:introduced=0,fixed=4.6.0; Osrg Gobgp <= 4.5.0.

**Is there a fix for CVE-2026-49837?** Yes. github.com/osrg/gobgp/v4 (Go): upgrade to 4.6.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-49837 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-49837?** Check whether you run github.com/osrg/gobgp/v4 (Go) or Osrg Gobgp at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- github.com/osrg/gobgp/v4 (Go): upgrade to 4.6.0 or later

  ```sh
  go get github.com/osrg/gobgp/v4@v4.6.0
  ```


## Technical details

An out-of-bounds read vulnerability exists in the BGP OPEN capability parser within `pkg/packet/bgp/bgp.go` and `pkg/packet/bgp/validate.go`. While the generic parser identifies the declared `CapLen`, specific decoders (such as the 4-octet AS capability) fail to limit their read operations to that boundary, instead reading from the entire remaining buffer. A remote attacker can exploit this by sending a malformed OPEN message with a `CapLen` of 0, forcing the parser to consume bytes from subsequent capabilities. This can result in incorrect peer AS validation and session establishment decisions. The issue is addressed in version 4.6.0.

## Affected products

- osrg gobgp/v4 <= 4.5.0

## Identifiers

- CVE-2026-49837
- GHSA-gjrg-jjr3-56cm
- GO-2026-5955

## Timeline

- 2026-06-02: disclosed
- 2026-07-09: advisory: GitHub Advisory published

## References

- [https://api.github.com/users/leo123-all](https://api.github.com/users/leo123-all)
- [https://github.com/leo123-all](https://github.com/leo123-all)
- [https://api.github.com/users/leo123-all/gists%7B/gist_id%7D](https://api.github.com/users/leo123-all/gists%7B/gist_id%7D)
- [https://api.github.com/users/leo123-all/repos](https://api.github.com/users/leo123-all/repos)
- [https://avatars.githubusercontent.com/u/266922117?v=4](https://avatars.githubusercontent.com/u/266922117?v=4)
- [https://api.github.com/users/leo123-all/events%7B/privacy%7D](https://api.github.com/users/leo123-all/events%7B/privacy%7D)

## Related threats

- [osrg GoBGP denial of service via empty AS_PATH attribute](https://junglewise.ai/threats/cve-2026-49838-osrg-gobgp-denial-of-service-via-empty-as-path-attribute)
- [GoBGP integer underflow in BGPUpdate.DecodeFromBytes](https://junglewise.ai/threats/cve-2026-37462-gobgp-integer-underflow-in-bgpupdate-decodefrombytes)
- [osrg GoBGP nil pointer dereference in AdjRib.Update](https://junglewise.ai/threats/cve-2026-42285-osrg-gobgp-nil-pointer-dereference-in-adjrib-update)
- [GoBGP has Remote Denial of Service (Panic) in UpdatePathAttrs4ByteAs via Malformed BGP UPDATE](https://junglewise.ai/threats/cve-2026-41643-gobgp-has-remote-denial-of-service-panic-in)
- [GO-2026-5198 - GoBGP: Remote Denial of Service (Panic) via Malformed Well-known Path Attribute in github.com/osrg/gobgp](https://junglewise.ai/threats/cve-2026-41642-gobgp-has-remote-denial-of-service-panic-via-malformed-well-known)
