CVE-2026-49837: GoBGP BGP OPEN Capability Parser May Vulnerability
MODERATECVE-2026-49837 is a MODERATE (CVSS 5.9) bgp open capability parser may vulnerability (CWE-125: Out-of-bounds Read) affecting GoBGP libraries in the Go ecosystem. The issue involves bgp open capability parser may read capability values outside declared caplen boundaries. Remediation is available by upgrading affected packages to version 4.6.0.
CVE-2026-49837 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2026-49837
To remediate this vulnerability, upgrade all affected GoBGP dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/osrg/gobgp/v4 to 4.6.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/osrg/gobgp/v4
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-49837, inspect your project dependencies for GoBGP:
inspect dependencies for github.com/osrg/gobgp/v4
Analyze the terminal output to locate any version of GoBGP in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.6.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In GoBGP, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-49837 Affected GoBGP Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/osrg/gobgp/v4
|
Go |
< 4.6.0
|
4.6.0
|
References
Frequently Asked Questions
What is CVE-2026-49837?
Which GoBGP versions are affected?
What version fixes CVE-2026-49837?
Is github.com/osrg/gobgp/v4 affected?
What is the CVSS score of CVE-2026-49837?
What CWE is associated with CVE-2026-49837?
How can I check Go dependencies for CVE-2026-49837?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gjrg-jjr3-56cm",
"modified" : "2026-07-09T23:20:57Z",
"published" : "2026-07-09T23:20:57Z",
"aliases" : [ "CVE-2026-49837" ],
"summary" : "GoBGP: BGP OPEN capability parser may read capability values outside declared CapLen boundaries",
"details" : "### Summary\n GoBGP contains a BGP OPEN capability parsing issue where several concrete capability decoders may parse data from the full remaining capability buffer instead of the slice bounded by the declared capability length, `CapLen`.\n A malformed BGP OPEN message can cause bytes from a following capability to be interpreted as part of the current capability. The most security-relevant case is the 4-octet AS capability, where a capability with `CapLen == 0` may cause the parser to read bytes from the following capability as the 4-octet AS value. This parsed value may later affect peer AS validation during BGP session establishment.\n\n### Details\nThe issue is in the BGP OPEN capability parser under:\n\n- `pkg/packet/bgp/bgp.go`\n- `pkg/packet/bgp/validate.go`\n- \nThe BGP OPEN optional parameter capability format includes a capability code, a capability length field, and a capability value. Each concrete capability decoder should only parse bytes inside the declared capability value boundary.\nIn affected versions, the generic capability parser records the declared `CapLen`, but several concrete capability decoders continue parsing from the full remaining capability buffer after advancing past the two-byte capability header. Conceptually, the vulnerable pattern is:\n```go\ndata = data[2:]\n// decoder reads from data without first limiting it to CapLen\n\n### PoC\nThe following parser-level proof of concept demonstrates the issue without requiring a full BGP session or a running `bgpd` instance.\nThe malformed capability uses:\n- Capability Code: `65` (`BGP_CAP_FOUR_OCTET_AS_NUMBER`)\n- Declared `CapLen`: `0`\n- Four following bytes: `00 00 fd e8`\n\nAlthough the capability declares an empty value, affected versions parse the following four bytes as the 4-octet AS value `65000`.\n\n### Impact\nA remote peer that can send a malformed BGP OPEN message to a GoBGP instance may cause capability values to be parsed from outside their declared `CapLen` boundaries.\nIn the 4-octet AS capability case, this may affect:\n- peer AS validation;\n- capability negotiation;\n- interpretation of malformed OPEN messages;\n- acceptance or rejection decisions during BGP session establishment.\nThis issue does not appear to be arbitrary memory corruption, remote code execution, or information disclosure. It is a protocol parser boundary validation issue that can affect BGP OPEN validation semantics.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/osrg/gobgp/v4"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.6.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 4.5.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/osrg/gobgp/security/advisories/GHSA-gjrg-jjr3-56cm"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/osrg/gobgp"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-125" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-09T23:20:57Z",
"nvd_published_at" : null
}
}