CVE-2025-43970: Github.com/osrg/gobgp GoBGP Does Not Properly Check Vulnerability

MODERATE
Advisory Identifier: GHSA-hqhq-hp5x-xp3w
CVSS 4.3
CWE-1284
Published
Advisory Summary

CVE-2025-43970 is a MODERATE (CVSS 4.3) gobgp does not properly check vulnerability (CWE-1284: Improper Validation of Specified Quantity in Input) affecting Github.com/osrg/gobgp libraries in the Go ecosystem. The issue involves gobgp does not properly check the input length. Remediation is available by upgrading affected packages to version 3.35.0.

CVE-2025-43970 at a Glance

CVE Identifier CVE-2025-43970
GHSA Identifier GHSA-hqhq-hp5x-xp3w
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-1284: Improper Validation of Specified Quantity in Input
Affected Product Github.com/osrg/gobgp
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:L).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2025-43970

To remediate this vulnerability, upgrade all affected Github.com/osrg/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.

github.com/osrg/gobgp fixed: Latest secure release
Upgrade github.com/osrg/gobgp to Latest secure release
github.com/osrg/gobgp/v3 fixed: 3.35.0
Upgrade github.com/osrg/gobgp/v3 to 3.35.0
Verify Direct and Transitive Dependencies

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

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-43970, inspect your project dependencies for Github.com/osrg/gobgp:

inspect dependencies for github.com/osrg/gobgp

Analyze the terminal output to locate any version of Github.com/osrg/gobgp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.35.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-1284: Improper Validation of Specified Quantity in Input, where the product receives input that is expected to specify a quantity (such as size or length), but it does not validate or incorrectly validates that the quantity has the required properties. In Github.com/osrg/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

An issue was discovered in GoBGP before 3.35.0. pkg/packet/mrt/mrt.go does not properly check the input length, e.g., by ensuring that there are 12 bytes or 36 bytes (depending on the address family).

CVE-2025-43970 Affected Github.com/osrg/gobgp Versions

2 component(s)
Fixed Versions:
3.35.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/osrg/gobgp
Go
github.com/osrg/gobgp/v3
Go
< 3.35.0
3.35.0

References

Frequently Asked Questions

What is CVE-2025-43970?
CVE-2025-43970 is a security vulnerability in Github.com/osrg/gobgp involving GoBGP does not properly check the input length under CWE-1284: Improper Validation of Specified Quantity in Input.
Which Github.com/osrg/gobgp versions are affected?
Affected versions include releases prior to 3.35.0 across affected packages: github.com/osrg/gobgp, github.com/osrg/gobgp/v3.
What version fixes CVE-2025-43970?
Upgrading to 3.35.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/osrg/gobgp affected?
Yes, github.com/osrg/gobgp is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is github.com/osrg/gobgp/v3 affected?
Yes, github.com/osrg/gobgp/v3 is affected in releases prior to 3.35.0. Upgrade your dependency to 3.35.0 or later.
What is the CVSS score of CVE-2025-43970?
CVE-2025-43970 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:L.
What CWE is associated with CVE-2025-43970?
CVE-2025-43970 is classified under CWE-1284: Improper Validation of Specified Quantity in Input (The product receives input that is expected to specify a quantity (such as size or length), but it does not validate or incorrectly validates that the quantity has the required properties.).
How can I check Go dependencies for CVE-2025-43970?
Run the dependency tree command: 'inspect dependencies for github.com/osrg/gobgp'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hqhq-hp5x-xp3w",
  "modified" : "2025-04-21T21:55:19Z",
  "published" : "2025-04-21T03:30:18Z",
  "aliases" : [ "CVE-2025-43970" ],
  "summary" : "GoBGP does not properly check the input length",
  "details" : "An issue was discovered in GoBGP before 3.35.0. pkg/packet/mrt/mrt.go does not properly check the input length, e.g., by ensuring that there are 12 bytes or 36 bytes (depending on the address family).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/osrg/gobgp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 3.35.0"
    }
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/osrg/gobgp/v3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.35.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-43970"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/osrg/gobgp/commit/5153bafbe8dbe1a2f02a70bbf0365e98b80e47b0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/osrg/gobgp"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/osrg/gobgp/compare/v3.34.0...v3.35.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1284" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-04-21T21:55:19Z",
    "nvd_published_at" : "2025-04-21T01:15:45Z"
  }
}